mbox series

[v2,0/3] Extending TLS testing and fixing TLS gnu2 for ARM

Message ID 20240312162120.1360522-1-adhemerval.zanella@linaro.org
Headers show
Series Extending TLS testing and fixing TLS gnu2 for ARM | expand

Message

Adhemerval Zanella Netto March 12, 2024, 4:21 p.m. UTC
A recent x86 fix for TLS descriptors [1] uncovered an ARM issue on
_dl_tlsdesc_dynamic where it fails to save/restore all possible
register.

And checking if aarch64 is also affected, I noted that the TLS
descriptor tests are only enabled iff -mtls-dialect= accepts 'gnu2'.
Since aarch64 uses a different naming for the TLS abi
(traditional/desc), some tests are not enabled.  The last patch fixes
it by parametrizing the TLS descriptor dialect name.

[1] https://sourceware.org/pipermail/libc-alpha/2024-February/154995.html

Changes from v2
- Use -shared instead of -unresolved-symbols=ignore-all on configure
  check.
- Extend tst-gnu2-tls2.h test for both HWCAP_ARM_VFP and
  HWCAP_ARM_VFPD32.
- Use -mtls-dialect=desc for aarch64.

Adhemerval Zanella (3):
  Ignore undefined symbols for -mtls-dialect=gnu2
  arm: Update _dl_tlsdesc_dynamic to preserve caller-saved registers (BZ
    31372)
  elf: Enable TLS descriptor tests on aarch64

 config.h.in                  |   3 +
 configure                    |  25 ++++---
 configure.ac                 |  17 +++--
 elf/Makefile                 |  30 ++++----
 elf/tst-gnu2-tls2.h          |   4 ++
 elf/tst-gnu2-tls2mod0.c      |   3 +-
 elf/tst-gnu2-tls2mod1.c      |   3 +-
 elf/tst-gnu2-tls2mod2.c      |   3 +-
 sysdeps/aarch64/preconfigure |   1 +
 sysdeps/arm/Makefile         |   8 +--
 sysdeps/arm/configure        |  32 +++++++++
 sysdeps/arm/configure.ac     |  15 ++++
 sysdeps/arm/dl-tlsdesc.S     |  70 ++++++++++++++++---
 sysdeps/arm/tst-gnu2-tls2.h  | 128 +++++++++++++++++++++++++++++++++++
 14 files changed, 292 insertions(+), 50 deletions(-)
 create mode 100644 sysdeps/arm/tst-gnu2-tls2.h