diff options
author | Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> | 2023-01-10 14:34:16 +0100 |
---|---|---|
committer | Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> | 2023-01-10 14:34:16 +0100 |
commit | aefebe82dc89711384b85329daa48d04c1d3a45b (patch) | |
tree | 11200422b2e566a41b07e2229c51692034a179b0 /ld/testsuite | |
parent | 18737d14799d609054994987dd75631430637a99 (diff) | |
download | binutils-aefebe82dc89711384b85329daa48d04c1d3a45b.zip binutils-aefebe82dc89711384b85329daa48d04c1d3a45b.tar.gz binutils-aefebe82dc89711384b85329daa48d04c1d3a45b.tar.bz2 |
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.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-s390/reloctlsle-1.d | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-s390/reloctlsle-1.s | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/ld/testsuite/ld-s390/reloctlsle-1.d b/ld/testsuite/ld-s390/reloctlsle-1.d new file mode 100644 index 0000000..a24c3d6 --- /dev/null +++ b/ld/testsuite/ld-s390/reloctlsle-1.d @@ -0,0 +1,6 @@ +#as: -m64 -mzarch -march=z900 +#ld: -m elf64_s390 -static +#readelf: -x .data + +Hex dump of section '.data': + 0x[0-9a-f]+ ffffffff fffffff0 ffffffff fffffff8 ................ diff --git a/ld/testsuite/ld-s390/reloctlsle-1.s b/ld/testsuite/ld-s390/reloctlsle-1.s new file mode 100644 index 0000000..c8f351d --- /dev/null +++ b/ld/testsuite/ld-s390/reloctlsle-1.s @@ -0,0 +1,14 @@ + .text + .globl _start +_start: + larl %r0,bar + + .section .tbss,"awT",@nobits + .align 8 +foo: .zero 8 + .zero 8 + + .data + .align 8 + .quad foo@NTPOFF +bar: .quad foo@NTPOFF+8 |