mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
elf, nptl: Initialize static TLS directly in ld.so
The stack list is available in ld.so since commit
1daccf403b
("nptl: Move stack list
variables into _rtld_global"), so it's possible to walk the stack
list directly in ld.so and perform the initialization there.
This eliminates an unprotected function pointer from _rtld_global
and reduces the libpthread initialization code.
This commit is contained in:
@ -1139,7 +1139,9 @@ dl_main (const ElfW(Phdr) *phdr,
|
||||
struct dl_main_state state;
|
||||
dl_main_state_init (&state);
|
||||
|
||||
#if !THREAD_GSCOPE_IN_TCB
|
||||
GL(dl_init_static_tls) = &_dl_nothread_init_static_tls;
|
||||
#endif
|
||||
|
||||
#if defined SHARED && defined _LIBC_REENTRANT \
|
||||
&& defined __rtld_lock_default_lock_recursive
|
||||
|
Reference in New Issue
Block a user