aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-10-13 15:23:35 +1030
committerAlan Modra <amodra@gmail.com>2017-10-14 00:15:44 +1030
commit354bac403e9a19bbbfb676d854db5f11f0e84c27 (patch)
treecf07f3f9f14767254c8abfbe908755030e749044 /ld
parent9e86da0760aa1e52178cc5b90cd92a7cd4a338f9 (diff)
downloadgdb-354bac403e9a19bbbfb676d854db5f11f0e84c27.zip
gdb-354bac403e9a19bbbfb676d854db5f11f0e84c27.tar.gz
gdb-354bac403e9a19bbbfb676d854db5f11f0e84c27.tar.bz2
PR22263 testcase
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.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/testsuite/ld-elf/pr22263-1.rd7
-rw-r--r--ld/testsuite/ld-elf/tls.exp2
3 files changed, 12 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b0f7cd2..47cc5a8 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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
diff --git a/ld/testsuite/ld-elf/pr22263-1.rd b/ld/testsuite/ld-elf/pr22263-1.rd
index 9a583fb..f29f7fe 100644
--- a/ld/testsuite/ld-elf/pr22263-1.rd
+++ b/ld/testsuite/ld-elf/pr22263-1.rd
@@ -1,2 +1,5 @@
-
-There are no relocations in this file.
+# tprel relocs are not needed in a PIE
+#failif
+#...
+.* R_.*_TP.*
+#pass
diff --git a/ld/testsuite/ld-elf/tls.exp b/ld/testsuite/ld-elf/tls.exp
index 9d64d6c..dd24071 100644
--- a/ld/testsuite/ld-elf/tls.exp
+++ b/ld/testsuite/ld-elf/tls.exp
@@ -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 } \