From f9f2a150e845fa19fc047285aa38e9164e42aa6a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 13 Apr 2002 07:55:02 +0000 Subject: Update. 2002-04-13 Ulrich Drepper * elf/do-lookup.h [!VERSIONED]: Add new parameter flags. Use it to check whether the caller prefers getting the most recent version of a symbol of the earliest version. * elf/dl-lookup.c: Adjust all callers of do_lookup. Change _dl_do_lookup to also take the new parameter and pass it on. Change 'explicit' parameter of _dl_lookup_symbol and _dl_lookup_versioned_symbol to flags. Adjust tests. * sysdeps/generic/ldsodefs.h: Adjust prototypes. * elf/dl-libc.c: Adjust all callers of _dl_lookup_symbol and _dl_lookup_versioned_symbol. * elf/dl-reloc.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-sym.c: Likewise. * sysdeps/mips/dl-machine.h: Likewise. --- elf/dl-sym.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'elf/dl-sym.c') diff --git a/elf/dl-sym.c b/elf/dl-sym.c index 8cb5d2f411..3bf8104a4a 100644 --- a/elf/dl-sym.c +++ b/elf/dl-sym.c @@ -51,7 +51,9 @@ _dl_sym (void *handle, const char *name, void *who) if (handle == RTLD_DEFAULT) /* Search the global scope as seen in the caller object. */ - result = _dl_lookup_symbol (name, match, &ref, match->l_scope, 0, 0); + result = _dl_lookup_symbol (name, match, &ref, match->l_scope, 0, + DL_LOOKUP_RETURN_NEWEST + | DL_LOOKUP_ADD_DEPENDENCY); else { if (handle != RTLD_NEXT) @@ -60,7 +62,7 @@ _dl_sym (void *handle, const char *name, void *who) struct link_map *map = handle; result = _dl_lookup_symbol (name, match, &ref, map->l_local_scope, - 0, 1); + 0, DL_LOOKUP_RETURN_NEWEST); } else { @@ -132,7 +134,7 @@ _dl_vsym (void *handle, const char *name, const char *version, void *who) if (handle == RTLD_DEFAULT) /* Search the global scope. */ result = _dl_lookup_versioned_symbol (name, match, &ref, match->l_scope, - &vers, 0, 0); + &vers, 0, DL_LOOKUP_ADD_DEPENDENCY); else if (handle == RTLD_NEXT) { if (__builtin_expect (match == GL(dl_loaded), 0)) @@ -157,7 +159,7 @@ RTLD_NEXT used in code not dynamically loaded")); /* Search the scope of the given object. */ struct link_map *map = handle; result = _dl_lookup_versioned_symbol (name, map, &ref, - map->l_local_scope, &vers, 0, 1); + map->l_local_scope, &vers, 0, 0); } if (ref != NULL) -- cgit v1.2.3