]> git.ipfire.org Git - thirdparty/glibc.git/commit
misc: Optimize internal usage of __libc_single_threaded
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 7 Jun 2022 14:11:03 +0000 (11:11 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 24 Jun 2022 20:45:58 +0000 (17:45 -0300)
commitbaf2a265c71113a91f6971313ef191be9e77ef6a
treead894e8766707e8c10e98b6e4c857ab315fa0276
parent5b41b2659d35b72636ab50a28d6815cad9c22a66
misc: Optimize internal usage of __libc_single_threaded

By adding an internal alias to avoid the GOT indirection.
On some architecture, __libc_single_thread may be accessed through
copy relocations and thus it requires to update also the copies
default copy.

This is done by adding a new internal macro,
libc_hidden_data_{proto,def}, which has an addition argument that
specifies the alias name (instead of default __GI_ one).

Checked on x86_64-linux-gnu and i686-linux-gnu.

Reviewed-by: Fangrui Song <maskray@google.com>
elf/libc_early_init.c
include/libc-symbols.h
include/sys/single_threaded.h
misc/single_threaded.c
nptl/pthread_create.c
posix/fork.c
sysdeps/nptl/setxid.h