diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-11-23 05:06:51 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-11-23 05:13:55 -0800 |
commit | cbf097d7b024fad33d13cc43ff0d35f2e0b11898 (patch) | |
tree | a9ec0a3b9187e473c607a1d54c817d21ed27d262 /ld | |
parent | e1b9725dfaf7a993fa06ee71ae72e6ded7470f1b (diff) | |
download | fsf-binutils-gdb-cbf097d7b024fad33d13cc43ff0d35f2e0b11898.zip fsf-binutils-gdb-cbf097d7b024fad33d13cc43ff0d35f2e0b11898.tar.gz fsf-binutils-gdb-cbf097d7b024fad33d13cc43ff0d35f2e0b11898.tar.bz2 |
s390x: Set .got sh_entsize only if .got size > 0
bfd/
PR ld/26918
* elf64-s390.c (elf_s390_finish_dynamic_sections): Set .got
sh_entsize only if .got size > 0.
ld:
PR ld/26918
* testsuite/ld-s390/pr26918-1.d: New file.
* testsuite/ld-s390/pr26918-1.s: Likewise.
* testsuite/ld-s390/s390.exp: Run all *.d tests.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-s390/pr26918-1.d | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-s390/pr26918-1.s | 19 | ||||
-rw-r--r-- | ld/testsuite/ld-s390/s390.exp | 7 |
4 files changed, 38 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 2ee8778..2d687f9 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2020-11-23 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/26918 + * testsuite/ld-s390/pr26918-1.d: New file. + * testsuite/ld-s390/pr26918-1.s: Likewise. + * testsuite/ld-s390/s390.exp: Run all *.d tests. + 2020-11-23 Shahab Vahedi <shahab@synopsys.org> * testsuite/ld-arc/tls_ie-01.d: Use a more general pattern. diff --git a/ld/testsuite/ld-s390/pr26918-1.d b/ld/testsuite/ld-s390/pr26918-1.d new file mode 100644 index 0000000..147ed98 --- /dev/null +++ b/ld/testsuite/ld-s390/pr26918-1.d @@ -0,0 +1,5 @@ +#as: -m64 -mzarch -march=z900 +#ld: -m elf64_s390 -e start -static +#readelf: -r --wide + +There are no relocations in this file. diff --git a/ld/testsuite/ld-s390/pr26918-1.s b/ld/testsuite/ld-s390/pr26918-1.s new file mode 100644 index 0000000..980bc41 --- /dev/null +++ b/ld/testsuite/ld-s390/pr26918-1.s @@ -0,0 +1,19 @@ + .machinemode zarch + .machine "z900" +.text + .align 8 +.globl start + .type start, @function +start: + larl %r1,foo@GOTENT + lg %r1,0(%r1) + lgf %r2,0(%r1) + br %r14 + .size start, .-start +.globl foo +.bss + .align 4 + .type foo, @object + .size foo, 4 +foo: + .zero 4 diff --git a/ld/testsuite/ld-s390/s390.exp b/ld/testsuite/ld-s390/s390.exp index 660cf4b..ee3438e 100644 --- a/ld/testsuite/ld-s390/s390.exp +++ b/ld/testsuite/ld-s390/s390.exp @@ -95,3 +95,10 @@ if [istarget "s390x-*-*"] { run_ld_link_tests $s390tests run_ld_link_tests $s390xtests } + +set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] +foreach t $test_list { + # We need to strip the ".d", but can leave the dirname. + verbose [file rootname $t] + run_dump_test [file rootname $t] +} |