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

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

Message

Adhemerval Zanella Feb. 29, 2024, 7:46 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

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  | 96 ++++++++++++++++++++++++++++++++++++
 14 files changed, 260 insertions(+), 50 deletions(-)
 create mode 100644 sysdeps/arm/tst-gnu2-tls2.h