From d017b0ab5a181dce4145f3a1b3b27e3341abd201 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 10 May 2021 10:31:41 +0200 Subject: 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 Reviewed-by: Carlos O'Donell --- csu/libc-tls.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'csu/libc-tls.c') diff --git a/csu/libc-tls.c b/csu/libc-tls.c index 22f8e48..5515204 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) -- cgit v1.1