1
0
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:
Florian Weimer
2021-05-05 06:20:31 +02:00
parent 2c71177309
commit 7cbf1c8416
9 changed files with 65 additions and 44 deletions

View File

@ -191,8 +191,6 @@ __pthread_initialize_minimal_internal (void)
GL(dl_make_stack_executable_hook) = &__make_stacks_executable;
#endif
GL(dl_init_static_tls) = &__pthread_init_static_tls;
/* Register the fork generation counter with the libc. */
#ifndef TLS_MULTIPLE_THREADS_IN_TCB
__libc_multiple_threads_ptr =