elf: Introduce __tls_init_tp for second-phase TCB initialization
authorFlorian Weimer <fweimer@redhat.com>
Wed, 21 Apr 2021 17:49:51 +0000 (19:49 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 21 Apr 2021 17:49:51 +0000 (19:49 +0200)
commit90d7e7e5bd3b0683a27c658388b6515ce950c78e
treee0de4856de1b728a33cd778d1b05a3a169953cd7
parent90e97b37201c9b33ee79296b6eb034d5d5db925c
elf: Introduce __tls_init_tp for second-phase TCB initialization

TLS_INIT_TP is processor-specific, so it is not a good place to
put thread library initialization code (it would have to be repeated
for all CPUs).  Introduce __tls_init_tp as a separate function,
to be called immediately after TLS_INIT_TP.  Move the existing
stack list setup code for NPTL to this function.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
csu/libc-tls.c
elf/Makefile
elf/dl-tls_init_tp.c [new file with mode: 0644]
elf/rtld.c
sysdeps/generic/ldsodefs.h
sysdeps/nptl/dl-tls_init_tp.c [new file with mode: 0644]