summaryrefslogtreecommitdiff
path: root/elf/dl-sym.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-10-23 20:02:38 +0000
committerUlrich Drepper <drepper@redhat.com>2000-10-23 20:02:38 +0000
commit0d0db00c0238627fdfa46f9990e3489257f252d4 (patch)
tree3d5dc118e3e1356bd554c467a87a079d450a30a1 /elf/dl-sym.c
parentf288d2b27c3327586097f16fb24c138e0e3cd547 (diff)
Update.
2000-10-23 Ulrich Drepper <drepper@redhat.com> * elf/dl-sym.c (_dl_sym): For RTLD_DEFAULT, search in objects global scope if we can determine it.
Diffstat (limited to 'elf/dl-sym.c')
-rw-r--r--elf/dl-sym.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/elf/dl-sym.c b/elf/dl-sym.c
index 873865698c..954741b365 100644
--- a/elf/dl-sym.c
+++ b/elf/dl-sym.c
@@ -42,8 +42,13 @@ _dl_sym (void *handle, const char *name, void *who)
match = l;
if (handle == RTLD_DEFAULT)
- /* Search the global scope. */
- result = _dl_lookup_symbol (name, match, &ref, _dl_global_scope, 0, 0);
+ {
+ /* Search the global scope as seen in the caller object. */
+ if (match != NULL)
+ result = _dl_lookup_symbol (name, match, &ref, match->l_scope, 0, 0);
+ else
+ result = _dl_lookup_symbol (name, match, &ref, _dl_global_scope, 0, 0);
+ }
else
{
if (handle != RTLD_NEXT)