PR22263 testcase
authorAlan Modra <amodra@gmail.com>
Fri, 13 Oct 2017 04:53:35 +0000 (15:23 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 13 Oct 2017 13:45:44 +0000 (00:15 +1030)
A number of targets need dynamic relocs in PIEs for reasons other than
relocating thread variables.  The PR is about text relocations, and,
reading between the lines, unnecessary dynamic tprel relocations.
Change the test to check for those conditions rather than no dynamic
relocations

PR ld/22263
* testsuite/ld-elf/tls.exp: Link with -z text.
* testsuite/ld-elf/pr22263-1.rd: Test for tprel relocs.

ld/ChangeLog
ld/testsuite/ld-elf/pr22263-1.rd
ld/testsuite/ld-elf/tls.exp

index b0f7cd2..47cc5a8 100644 (file)
@@ -1,3 +1,9 @@
+2017-10-13  Alan Modra  <amodra@gmail.com>
+
+       PR ld/22263
+       * testsuite/ld-elf/tls.exp: Link with -z text.
+       * testsuite/ld-elf/pr22263-1.rd: Test for tprel relocs.
+
 2017-10-12  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/22263
index 9a583fb..f29f7fe 100644 (file)
@@ -1,2 +1,5 @@
-
-There are no relocations in this file.
+# tprel relocs are not needed in a PIE
+#failif
+#...
+.* R_.*_TP.*
+#pass
index 9d64d6c..dd24071 100644 (file)
@@ -40,7 +40,7 @@ if { [which $CC] == 0 } {
 run_ld_link_tests [list \
     [list \
        "Build pr22263-1" \
-       "-pie -e _start" \
+       "-pie -e _start -z text" \
        "" \
        "" \
        { pr22263-1a.c pr22263-1b.c } \