1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

* elf/dl-close.c (_dl_close_worker): When removing object from

global scope, wait for all lookups to finish afterwards.
	* elf/dl-open.c (add_to_global): When global scope array must
	grow, allocate a new one and free old array only after all
	lookups finish.
	* elf/dl-runtime.c (_dl_fixup): Protect using global scope.
	(_dl_lookup_symbol_x): Likewise.
	* elf/dl-support.c: Define _dl_wait_lookup_done.
	* sysdeps/generic/ldsodefs.h (struct rtld_global): Add
	_dl_wait_lookup_done.
This commit is contained in:
Ulrich Drepper
2007-05-19 07:08:23 +00:00
parent 2acd01acb1
commit df94b6412e
14 changed files with 204 additions and 37 deletions

View File

@ -31,6 +31,7 @@
#include <sys/types.h>
#include <sys/mman.h>
#include <sysdep-cancel.h>
#include <tls.h>
/* Type of the constructor functions. */
@ -487,6 +488,9 @@ _dl_close_worker (struct link_map *map)
ns_msl->r_list[cnt - 1] = ns_msl->r_list[cnt];
--ns_msl->r_nlist;
if (!RTLD_SINGLE_THREAD_P)
THREAD_GSCOPE_WAIT ();
}
/* Remove the object from the dtv slotinfo array if it uses TLS. */