[PATCH v2 0/3] Consolidate static TLS allocation for static binaries, fix extra TLS

Florian Weimer fweimer@redhat.com
Mon Jan 13 12:32:51 GMT 2025


This new version removes a compatibility hack from csu/libc-tls.c that's
no longer necessary after the _dl_determine_tlsoffset rework (in the
second patch).

In addition to the previous testing, it's now been checked on
s390x-linux-gnu as well.

Thanks,
Florian

Florian Weimer (3):
  elf: Iterate over loaded object list in _dl_determine_tlsoffset
  Consolidate TLS block allocation for static binaries with ld.so
  Linux: Add tests that check that TLS and rseq area are separate

 csu/libc-tls.c                                | 193 ++++--------------
 elf/dl-tls.c                                  | 123 ++++-------
 elf/dl-tls_block_align.h                      |  70 +++++++
 elf/rtld.c                                    |  23 +--
 sysdeps/unix/sysv/linux/Makefile              |  14 ++
 .../linux/tst-rseq-tls-range-4096-static.c    |   1 +
 .../unix/sysv/linux/tst-rseq-tls-range-4096.c |   1 +
 .../unix/sysv/linux/tst-rseq-tls-range-mod.c  |   1 +
 .../sysv/linux/tst-rseq-tls-range-static.c    |   1 +
 sysdeps/unix/sysv/linux/tst-rseq-tls-range.c  | 168 +++++++++++++++
 10 files changed, 339 insertions(+), 256 deletions(-)
 create mode 100644 elf/dl-tls_block_align.h
 create mode 100644 sysdeps/unix/sysv/linux/tst-rseq-tls-range-4096-static.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-rseq-tls-range-4096.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-rseq-tls-range-mod.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-rseq-tls-range-static.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-rseq-tls-range.c


base-commit: 53a71b9f66dbc7f0ce44ec95bff7caa31fa0374b
-- 
2.47.1



More information about the Libc-alpha mailing list