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.
This commit is contained in:
Ulrich Drepper 2000-10-23 20:02:38 +00:00
parent f288d2b27c
commit 0d0db00c02
2 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,8 @@
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.
2000-10-23 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/ia64/bits/resource.h (RLIMIT_LOCKS): Added.

View file

@ -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)