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.
This commit is contained in:
Alan Modra
2017-10-13 15:23:35 +10:30
parent 9e86da0760
commit 354bac403e
3 changed files with 12 additions and 3 deletions

View 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> 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
PR ld/22263 PR ld/22263

View File

@ -1,2 +1,5 @@
# tprel relocs are not needed in a PIE
There are no relocations in this file. #failif
#...
.* R_.*_TP.*
#pass

View File

@ -40,7 +40,7 @@ if { [which $CC] == 0 } {
run_ld_link_tests [list \ run_ld_link_tests [list \
[list \ [list \
"Build pr22263-1" \ "Build pr22263-1" \
"-pie -e _start" \ "-pie -e _start -z text" \
"" \ "" \
"" \ "" \
{ pr22263-1a.c pr22263-1b.c } \ { pr22263-1a.c pr22263-1b.c } \