IBM zSystems: Fix offset relative to static TLS
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Tue, 10 Jan 2023 13:34:16 +0000 (14:34 +0100)
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Tue, 10 Jan 2023 13:34:16 +0000 (14:34 +0100)
commitaefebe82dc89711384b85329daa48d04c1d3a45b
tree11200422b2e566a41b07e2229c51692034a179b0
parent18737d14799d609054994987dd75631430637a99
IBM zSystems: Fix offset relative to static TLS

For local exec TLS relocations of the form foo@NTPOFF+x the addend was
ignored.

bfd/ChangeLog:

* elf32-s390.c (elf_s390_relocate_section): Honor addend for
R_390_TLS_LE32.
* elf64-s390.c (elf_s390_relocate_section): Honor addend for
R_390_TLS_LE64.

ld/ChangeLog:

* testsuite/ld-s390/reloctlsle-1.d: New test.
* testsuite/ld-s390/reloctlsle-1.s: New test.
bfd/elf32-s390.c
bfd/elf64-s390.c
ld/testsuite/ld-s390/reloctlsle-1.d [new file with mode: 0644]
ld/testsuite/ld-s390/reloctlsle-1.s [new file with mode: 0644]