mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-10 03:10:09 +00:00
b37899d34d
When glibc is built as a shared library, TLS is always initialized by the call of TLS_INIT_TP () macro made inside the dynamic loader, prior to running the main program (see dl-call_tls_init_tp.h). We can take advantage of this: we know for sure that __LIBC_NO_TLS () will evaluate to 0 in all other cases, so let the compiler know that explicitly too. Also, only define _hurd_tls_init () and TLS_INIT_TP () under the same conditions (either !SHARED or inside rtld), to statically assert that this is the case. Other than a microoptimization, this also helps with avoiding awkward sharing of the __libc_tls_initialized variable between ld.so and libc.so that we would have to do otherwise -- we know for sure that no sharing is required, simply because __libc_tls_initialized would always be set to true inside libc.so. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230319151017.531737-25-bugaevc@gmail.com> |
||
---|---|---|
.. | ||
bits | ||
htl | ||
____longjmp_chk.S | ||
__longjmp.S | ||
c++-types.data | ||
dl-tls-initialized.c | ||
getcontext.S | ||
Implies | ||
intr-msg.h | ||
ld.abilist | ||
libanl.abilist | ||
libBrokenLocale.abilist | ||
libc_malloc_debug.abilist | ||
libc.abilist | ||
libcrypt.abilist | ||
libdl.abilist | ||
libm.abilist | ||
libnsl.abilist | ||
libpthread.abilist | ||
libresolv.abilist | ||
librt.abilist | ||
libutil.abilist | ||
localplt.data | ||
longjmp-ts.c | ||
makecontext.S | ||
Makefile | ||
setcontext.S | ||
sigcontextinfo.h | ||
sigreturn.c | ||
static-start.S | ||
swapcontext.S | ||
tls.h | ||
tlsdesc.sym | ||
ucontext_i.sym | ||
Versions | ||
vm_param.h |