about summary refs log tree commit diff
path: root/elf/dl-sym.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-04-13 07:55:02 +0000
committerUlrich Drepper <drepper@redhat.com>2002-04-13 07:55:02 +0000
commitf9f2a150e845fa19fc047285aa38e9164e42aa6a (patch)
treef03cc56b23d340150f545060f32a12dabaa5aa4b /elf/dl-sym.c
parent61bb2ef098cc1e7e598e32511915525de98ed7d1 (diff)
downloadglibc-f9f2a150e845fa19fc047285aa38e9164e42aa6a.tar.gz
glibc-f9f2a150e845fa19fc047285aa38e9164e42aa6a.tar.xz
glibc-f9f2a150e845fa19fc047285aa38e9164e42aa6a.zip
Update.
2002-04-13  Ulrich Drepper  <drepper@redhat.com>

	* 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.
Diffstat (limited to 'elf/dl-sym.c')
-rw-r--r--elf/dl-sym.c10
1 files changed, 6 insertions, 4 deletions
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)