Don't allow RELATIVE relocs in pr22269 testcase
authorAlan Modra <amodra@gmail.com>
Mon, 21 Oct 2019 21:12:58 +0000 (07:42 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 22 Oct 2019 01:16:53 +0000 (11:46 +1030)
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.

ld/ChangeLog
ld/testsuite/ld-elf/pr22269-1.rd
ld/testsuite/ld-elf/shared.exp

index a5d6dd9d561c894c5137fa69080fef6187a3b608..8f64296c079e6193737d5ec33ca50170d99e84b8 100644 (file)
@@ -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
index 9df3c38581b2318ac2ee959d9a9e787446a7ac46..afad19cf81dac86a995f66d70c03e7ff08069326 100644 (file)
@@ -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
index 820570084a2725873b14a73e01414f6f9791ee26..02ec6f3a1b84578a6a95d6b0d96a659862b6b668 100644 (file)
@@ -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 } \
This page took 0.045188 seconds and 4 git commands to generate.