aboutsummaryrefslogtreecommitdiff
path: root/elf/dlsym.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-09-06 09:16:53 +0000
committerUlrich Drepper <drepper@redhat.com>1998-09-06 09:16:53 +0000
commitbe93561004695198611aa8707f10250f780988b2 (patch)
tree7b9a502d849b761d966114b855a1fa9de4022e90 /elf/dlsym.c
parent9eb71e60ef889158238c3066c75b65336d846684 (diff)
downloadglibc-be93561004695198611aa8707f10250f780988b2.tar
glibc-be93561004695198611aa8707f10250f780988b2.tar.gz
glibc-be93561004695198611aa8707f10250f780988b2.tar.bz2
glibc-be93561004695198611aa8707f10250f780988b2.zip
Update.
1998-09-06 09:00 Ulrich Drepper <drepper@cygnus.com> * version.h (VERSION): Bump to 2.0.96. Rewrite runtime linker to be truly thread-safe. There is now no global variable specifying the scope. We create all needed scopes at the time the link maps are created. * elf/Versions [GLIBC_2.1]: Add _dl_loaded and _dl_main_searchlist. * elf/link.h: Add struct r_scope_elem and use this for l_searchlist, l_symbolic_searchlist, l_scope, and l_local_scope elements in struct link_map. * elf/dl-close.c: Rewritten accordingly. * elf/dl-deps.c: Likewise. * elf/dl-error.c: Likewise. * elf/dl-init.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-object.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-symbol.c: Likewise. * elf/dl-version.c: Likewise. * elf/dlfcn.h: Likewise. * elf/dlsym.c: Likewise. * elf/dlvsym.c: Likewise. * elf/ldsodefs.h: Likewise. * elf/rtld.c: Likewise. * iconv/gconv_dl.c: Likewise. * nss/nsswitch.c: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise.
Diffstat (limited to 'elf/dlsym.c')
-rw-r--r--elf/dlsym.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/elf/dlsym.c b/elf/dlsym.c
index 8b20dcf90d..ed786a2625 100644
--- a/elf/dlsym.c
+++ b/elf/dlsym.c
@@ -44,9 +44,7 @@ dlsym_doit (void *a)
if (args->handle == NULL)
/* Search the global scope. */
args->loadbase = _dl_lookup_symbol (args->name, &args->ref,
- &(_dl_global_scope
- ?: _dl_default_scope)[2],
- NULL, 0);
+ _dl_global_scope, NULL, 0);
else if (args->handle == RTLD_NEXT)
{
struct link_map *l, *match;
@@ -65,19 +63,15 @@ RTLD_NEXT used in code not dynamically loaded"));
while (l->l_loader)
l = l->l_loader;
- {
- struct link_map *mapscope[2] = { l, NULL };
- args->loadbase = _dl_lookup_symbol_skip (args->name, &args->ref,
- mapscope, NULL, match);
- }
+ args->loadbase = _dl_lookup_symbol_skip (args->name, &args->ref,
+ l->l_local_scope, NULL, match);
}
else
{
/* Search the scope of the given object. */
struct link_map *map = args->handle;
- struct link_map *mapscope[2] = { map, NULL };
- args->loadbase = _dl_lookup_symbol (args->name, &args->ref, mapscope,
- map->l_name, 0);
+ args->loadbase = _dl_lookup_symbol (args->name, &args->ref,
+ map->l_local_scope, map->l_name, 0);
}
}