freebsd-dev/libexec/rtld-elf
Alexander Kabaev 20a86d1f34 Eliminate the use of symlook_needed function in favor of DAGS.
Place elements on DAG lists in breadth-first order. This allows us to
walk pre-built list in all cases where breadth-first dependency chain
enumeration is required.

Fix dlsym on special handle obtained by dlopen(NULL, ...) to do what
comment claims it does. Take advantage of recently added symlook_global
function to iterate over main objects and global DAGs lists properly in
search of a symbol. Since rtld itself provides part of the global
namespace, search rtld_obj too.

Remove recursion from init_dag and symlook_needed functions. Use
symlook_needed for ELF filtee processing only and change lookup order
used in the function to match the order used by Solaris runtime linker
under same circumstances. While there, fix weak symbol handling in the
loop so that we return the first weak symbol definition if no strong one
was found, instead of the last one.

Reviewed by: kib
MFC after:   1 month
2011-01-28 23:44:57 +00:00
..
amd64 When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
arm When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
i386 When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
ia64 When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
mips When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
powerpc When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
powerpc64 When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
sparc64 When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
debug.c Fix warnings on 64 bit platforms. 2003-06-19 16:09:18 +00:00
debug.h Use C99's varadic macro syntax instead of gcc's. 2006-03-28 18:26:47 +00:00
libmap.c Fix a malloc overrun in 32-bit compat libmap lookup code. 2006-01-31 06:08:28 +00:00
libmap.h Description from Dan: 2005-02-04 02:46:41 +00:00
Makefile Add a hook to pass debug flags to the build of rtld when doing make in 2010-12-25 08:42:38 +00:00
malloc.c Use the newly provided aux vectors to get pagesize and osreldate information. 2010-08-17 09:05:39 +00:00
map_object.c When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
rtld_lock.c Implement support for ELF filters in rtld. Both normal and auxillary 2010-12-25 08:51:20 +00:00
rtld_lock.h Implement support for ELF filters in rtld. Both normal and auxillary 2010-12-25 08:51:20 +00:00
rtld_tls.h Add support for Thread Local Storage. 2004-08-03 08:51:00 +00:00
rtld.1 Implement support for ELF filters in rtld. Both normal and auxillary 2010-12-25 08:51:20 +00:00
rtld.c Eliminate the use of symlook_needed function in favor of DAGS. 2011-01-28 23:44:57 +00:00
rtld.h In rtld, read the initial stack access mode from AT_STACKPROT as set 2011-01-08 17:11:49 +00:00
Symbol.map In rtld, read the initial stack access mode from AT_STACKPROT as set 2011-01-08 17:11:49 +00:00
xmalloc.c Add function prototypes. 2003-06-19 05:28:26 +00:00