diff options
author | Alan Modra <amodra@gmail.com> | 2019-10-22 07:42:58 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-10-22 11:46:53 +1030 |
commit | ef0cc92e9cd7a589e441389167a8d4fb2fe46367 (patch) | |
tree | 8a4840aa5a5f87783ff091c5b79fa42132025e29 /ld | |
parent | 5ae8188eaa075c74a7094383be7b9a4249ebf3fa (diff) | |
download | gdb-ef0cc92e9cd7a589e441389167a8d4fb2fe46367.zip gdb-ef0cc92e9cd7a589e441389167a8d4fb2fe46367.tar.gz gdb-ef0cc92e9cd7a589e441389167a8d4fb2fe46367.tar.bz2 |
Don't allow RELATIVE relocs in pr22269 testcase
At least, not in the GOT. R_PPC64_RELATIVE is fine for powerpc64 in
the .opd section.
PR 22269
* testsuite/ld-elf/pr22269-1.rd: Look for GOT section NONE and
RELATIVE relocs.
* testsuite/ld-elf/shared.exp (pr22269-1): Give test a better
name. Use -z nocombreloc.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr22269-1.rd | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/shared.exp | 4 |
3 files changed, 14 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index a5d6dd9..8f64296 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2019-10-22 Alan Modra <amodra@gmail.com> + + PR 22269 + * testsuite/ld-elf/pr22269-1.rd: Look for GOT section NONE and + RELATIVE relocs. + * testsuite/ld-elf/shared.exp (pr22269-1): Give test a better + name. Use -z nocombreloc. + 2019-10-19 Alan Modra <amodra@gmail.com> PR ld/25110 diff --git a/ld/testsuite/ld-elf/pr22269-1.rd b/ld/testsuite/ld-elf/pr22269-1.rd index 9df3c38..afad19c 100644 --- a/ld/testsuite/ld-elf/pr22269-1.rd +++ b/ld/testsuite/ld-elf/pr22269-1.rd @@ -1,5 +1,7 @@ -# NONE relocs are not needed in a PIE. +# There should not be any NONE or RELATIVE relocs for foo #failif #... -[0-9a-f]+ +[0-9a-f]+ +R_.*_NONE.* +Relocation section '\.rela?\.got' .* + Offset +Info +Type .* +[0-9a-f]+ +[0-9a-f]+ +R_.*_(NONE|RELATIVE).* #pass diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index 8205700..02ec6f3 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -781,8 +781,8 @@ run_cc_link_tests $build_tests run_ld_link_tests [list \ [list \ - "Build pr22269-1" \ - "-pie -e _start --no-dynamic-linker -z text" \ + "pr22269-1 (static pie undefined weak)" \ + "-pie -e _start --no-dynamic-linker -z text -z nocombreloc " \ "" \ "$AFLAGS_PIC" \ { pr22269-1.c } \ |