From 0d0db00c0238627fdfa46f9990e3489257f252d4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 23 Oct 2000 20:02:38 +0000 Subject: 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. --- elf/dl-sym.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'elf/dl-sym.c') 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) -- cgit v1.2.3