From 0d0db00c0238627fdfa46f9990e3489257f252d4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 23 Oct 2000 20:02:38 +0000 Subject: [PATCH] Update. 2000-10-23 Ulrich Drepper * elf/dl-sym.c (_dl_sym): For RTLD_DEFAULT, search in objects global scope if we can determine it. --- ChangeLog | 5 +++++ elf/dl-sym.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9cd77f9430..c95449cbb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-10-23 Ulrich Drepper + + * elf/dl-sym.c (_dl_sym): For RTLD_DEFAULT, search in objects + global scope if we can determine it. + 2000-10-23 Andreas Schwab * sysdeps/unix/sysv/linux/ia64/bits/resource.h (RLIMIT_LOCKS): Added. 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)