aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/tst-rseq-tls-range.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-01-16 20:02:42 +0100
committerFlorian Weimer <fweimer@redhat.com>2025-01-16 20:02:42 +0100
commitcbd9fd236981717d3d4ee942986ea912e9707c32 (patch)
treef6ea10053a17a49c2dcf73c4b23396e960186816 /sysdeps/unix/sysv/linux/tst-rseq-tls-range.c
parent7f784ffc173b5a2166ff846fd003a2264d614456 (diff)
downloadglibc-cbd9fd236981717d3d4ee942986ea912e9707c32.zip
glibc-cbd9fd236981717d3d4ee942986ea912e9707c32.tar.gz
glibc-cbd9fd236981717d3d4ee942986ea912e9707c32.tar.bz2
Consolidate TLS block allocation for static binaries with ld.so
Use the same code to compute the TLS block size and its alignment. The code in elf/dl-tls.c is linked in anyway for all binaries due to the reference to _dl_tls_static_surplus_init. It is not possible to call _dl_allocate_tls_storage directly because malloc is not available in the static case. (The dynamic linker uses the minimal malloc at this stage.) Therefore, split _dl_tls_block_size_with_pre and _dl_tls_block_align from _dl_allocate_tls_storage, and call those new functions from __libc_setup_tls. This fixes extra TLS allocation for the static case, and apparently some pre-existing bugs as well (the independent recomputation of TLS block sizes in init_static_tls looks rather suspect). Fixes commit 0e411c5d3098982d67cd2d7a233eaa6c977a1869 ("Add generic 'extra TLS'").
Diffstat (limited to 'sysdeps/unix/sysv/linux/tst-rseq-tls-range.c')
0 files changed, 0 insertions, 0 deletions