diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-04-03 03:51:04 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-04-03 03:51:04 +0000 |
commit | cf197e41e7e468697e5a8d7b3f4c4930dd557990 (patch) | |
tree | e1872dc669824d35aa47cc9964aa6fe9ea159f7b /elf/rtld.c | |
parent | ec79422d9e17bd5388a3fc34fcd2ef434e0cac26 (diff) | |
download | glibc-cf197e41e7e468697e5a8d7b3f4c4930dd557990.tar glibc-cf197e41e7e468697e5a8d7b3f4c4930dd557990.tar.gz glibc-cf197e41e7e468697e5a8d7b3f4c4930dd557990.tar.bz2 glibc-cf197e41e7e468697e5a8d7b3f4c4930dd557990.zip |
Update.
2000-04-02 Ulrich Drepper <drepper@redhat.com>
* elf/dl-fini.c (_dl_fini): Increment j counter after swapping in
element at this position.
* elf/Versions [ld.so] (GLIBC_2.2): Export _dl_load_lock.
* elf/link.h (struct link_map): Add l_reldepsmax, l_reldepsact, and
l_reldeps elements.
* elf/dl-lookup.c (add_dependency): New function.
(_dl_lookup_symbol): Use it whenever symbol was found in a global,
dynamically loaded object.
(_dl_lookup_symbol_skip): Likewise.
(_dl_lookup_versioned_symbol): Likewise.
(_dl_lookup_versioned_symbol_skip): Likewise.
* elf/dl-open.c: Don't define _dl_load_lock here...
* elf/rtld.c: ...but here...
* elf/dl-support.c: ...and here.
* elf/dl-close.c (_dl_close): Close also dependent objects introduce
through relocation.
* elf/dl-fini.c (_dl_fini): Also take dependencies introduced through
relocations.
* dlfcn/Makefile (glrefmain.out): Test is not expected to fail
anymore.
* dlfcn/glrefmain.c: Add one more debug message.
* Makeconfig (preprocess-versions): Don't add $(CPPFLAGS) to compiler
command line.
* Makerules (sysd-versions): Use ( ) instead of { }.
* elf/dl-load.c: Use __builtin_expect to signal that compiler should
optimize for the non-debugging case.
* elf/dl-lookup.c: Likewise.
* sysdeps/generic/libc-start.c: Likewise.
Diffstat (limited to 'elf/rtld.c')
-rw-r--r-- | elf/rtld.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/elf/rtld.c b/elf/rtld.c index 562e44aec8..24968f87cd 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -27,6 +27,7 @@ #include <entry.h> #include <fpu_control.h> #include <hp-timing.h> +#include <bits/libc-lock.h> #include "dynamic-link.h" #include "dl-librecon.h" @@ -105,6 +106,15 @@ struct r_scope_elem _dl_initial_searchlist; /* Array which is used when looking up in the global scope. */ struct r_scope_elem *_dl_global_scope[2]; +/* During the program run we must not modify the global data of + loaded shared object simultanously in two threads. Therefore we + protect `_dl_open' and `_dl_close' in dl-close.c. + + This must be a recursive lock since the initializer function of + the loaded object might as well require a call to this function. + At this time it is not anymore a problem to modify the tables. */ +__libc_lock_define_initialized_recursive (, _dl_load_lock) + /* Set nonzero during loading and initialization of executable and libraries, cleared before the executable's entry point runs. This must not be initialized to nonzero, because the unused dynamic |