about summary refs log tree commit diff
path: root/csu
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-10 10:31:41 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-10 10:31:41 +0200
commitd017b0ab5a181dce4145f3a1b3b27e3341abd201 (patch)
treecfe65201d70b7df83848838256d2c7288dcee67b /csu
parent0df5d8d404fbf6a7802737b0f9d32ab3376cec86 (diff)
downloadglibc-d017b0ab5a181dce4145f3a1b3b27e3341abd201.tar.gz
glibc-d017b0ab5a181dce4145f3a1b3b27e3341abd201.tar.xz
glibc-d017b0ab5a181dce4145f3a1b3b27e3341abd201.zip
elf: Introduce __tls_pre_init_tp
This is an early variant of __tls_init_tp, primarily for initializing
thread-related elements of _rtld_global/GL.

Some existing initialization code not needed for NPTL is moved into
the generic version of this function.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'csu')
-rw-r--r--csu/libc-tls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/csu/libc-tls.c b/csu/libc-tls.c
index 22f8e4838d..5515204863 100644
--- a/csu/libc-tls.c
+++ b/csu/libc-tls.c
@@ -114,6 +114,8 @@ __libc_setup_tls (void)
 
   struct link_map *main_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
 
+  __tls_pre_init_tp ();
+
   /* Look through the TLS segment if there is any.  */
   if (_dl_phdr != NULL)
     for (phdr = _dl_phdr; phdr < &_dl_phdr[_dl_phnum]; ++phdr)