DragonFly commits List (threaded) for 2012-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
git: rtld: Use DAGS for symbol lookup; adjust weak symbol logic
commit 153ab39206bda82ee461410163ae0f433bcb2629
Author: John Marino <draco@marino.st>
Date: Sat Jan 21 22:35:24 2012 +0100
rtld: Use DAGS for symbol lookup; adjust weak symbol logic
get_program_var_addr() must prefer the strong symbol to the weak one.
Search global objects, together with main object and dependencies for the
requested symbol.
Move the common code from symlook_default() into new helper
symlook_global(), and use it both in symlook_global() and
get_program_var_addr(). Supply lock state to get_program_var_addr().
Taken-from: FreeBSD SVN 217223 (10 JAN 2011)
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.
Taken-from: FreeBSD SVN 218051 (28 JAN 2011)
Summary of changes:
libexec/rtld-elf/rtld.c | 246 ++++++++++++++++++++++++-----------------------
1 files changed, 125 insertions(+), 121 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/153ab39206bda82ee461410163ae0f433bcb2629
--
DragonFly BSD source repository
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]