about summary refs log tree commit diff
path: root/elf/dl-support.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-05 06:20:31 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-05 06:20:31 +0200
commit7cbf1c8416b04c65dc3d253061d8a674ee3c616e (patch)
treee931adb0174f9f4ce64f4dfa97c6fcd489f0fc12 /elf/dl-support.c
parent2c71177309cc59788c2288c6033c9dbbd23f02c3 (diff)
downloadglibc-7cbf1c8416b04c65dc3d253061d8a674ee3c616e.tar.gz
glibc-7cbf1c8416b04c65dc3d253061d8a674ee3c616e.tar.xz
glibc-7cbf1c8416b04c65dc3d253061d8a674ee3c616e.zip
elf, nptl: Initialize static TLS directly in ld.so
The stack list is available in ld.so since commit
1daccf403b1bd86370eb94edca794dc106d02039 ("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.
Diffstat (limited to 'elf/dl-support.c')
-rw-r--r--elf/dl-support.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 7fc2ee78e2..f966a2e7cd 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -138,8 +138,6 @@ void *_dl_random;
 #include <dl-procruntime.c>
 #include <dl-procinfo.c>
 
-void (*_dl_init_static_tls) (struct link_map *) = &_dl_nothread_init_static_tls;
-
 size_t _dl_pagesize = EXEC_PAGESIZE;
 
 size_t _dl_minsigstacksize = CONSTANT_MINSIGSTKSZ;
@@ -197,6 +195,7 @@ list_t _dl_stack_user;
 int _dl_stack_cache_lock;
 #else
 int _dl_thread_gscope_count;
+void (*_dl_init_static_tls) (struct link_map *) = &_dl_nothread_init_static_tls;
 #endif
 struct dl_scope_free_list *_dl_scope_free_list;