From be93561004695198611aa8707f10250f780988b2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 6 Sep 1998 09:16:53 +0000 Subject: Update. 1998-09-06 09:00 Ulrich Drepper * 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. --- elf/dl-init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'elf/dl-init.c') diff --git a/elf/dl-init.c b/elf/dl-init.c index f93f8f1cb5..64aa1ce0bf 100644 --- a/elf/dl-init.c +++ b/elf/dl-init.c @@ -26,7 +26,7 @@ ElfW(Addr) internal_function -_dl_init_next (struct link_map *map) +_dl_init_next (struct r_scope_elem *searchlist) { unsigned int i; @@ -34,10 +34,10 @@ _dl_init_next (struct link_map *map) dependency order, so processing that list from back to front gets us breadth-first leaf-to-root order. */ - i = map->l_nsearchlist; + i = searchlist->r_nlist; while (i-- > 0) { - struct link_map *l = map->l_searchlist[i]; + struct link_map *l = searchlist->r_list[i]; if (l->l_init_called) /* This object is all done. */ @@ -53,8 +53,8 @@ _dl_init_next (struct link_map *map) continue; } - if (l->l_info[DT_INIT] && - !(l->l_name[0] == '\0' && l->l_type == lt_executable)) + if (l->l_info[DT_INIT] + && (l->l_name[0] != '\0' || l->l_type != lt_executable)) { /* Run this object's initializer. */ l->l_init_running = 1; -- cgit v1.2.3