diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-03-06 08:26:49 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-03-06 08:26:49 -0800 |
commit | 46175b4e04a91480b85420d9253adfa6c5ff5894 (patch) | |
tree | 077fed6b6709648cd79576876f4b4f0128148b47 /ld/testsuite/ld-i386 | |
parent | fb6a751f5f1fe7912e84dd90d06395c357da47c2 (diff) | |
download | gdb-46175b4e04a91480b85420d9253adfa6c5ff5894.zip gdb-46175b4e04a91480b85420d9253adfa6c5ff5894.tar.gz gdb-46175b4e04a91480b85420d9253adfa6c5ff5894.tar.bz2 |
Link tmpdir/copyreloc-main.o before tmpdir/copyreloc-lib.so
Since compiler may pass --as-needed to ld by default, link
tmpdir/copyreloc-main.o before tmpdir/copyreloc-lib.so.
* testsuite/ld-i386/i386.exp: Link tmpdir/copyreloc-main.o
before tmpdir/copyreloc-lib.so and test --as-needed.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index e5f4aaa..bf8e6b6 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -514,18 +514,26 @@ if { [isnative] "copyreloc-lib.so" \ ] \ [list \ - "Build copyreloc-main with PIE and GOTOFF (1)" \ - "tmpdir/copyreloc-lib.so -pie" \ + "Build libcopyreloc-main.a" \ + "" \ "" \ { copyreloc-main.S } \ + {} \ + "libcopyreloc-main.a" \ + ] \ + [list \ + "Build copyreloc-main with PIE and GOTOFF (1)" \ + "tmpdir/copyreloc-main.o tmpdir/copyreloc-lib.so -pie" \ + "" \ + { dummy.s } \ {{readelf {-Wr} copyreloc-main1.rd}} \ "copyreloc-main" \ ] \ [list \ "Build copyreloc-main with PIE and GOTOFF (2)" \ - "tmpdir/copyreloc-lib.so -pie" \ + "tmpdir/copyreloc-main.o tmpdir/copyreloc-lib.so -pie" \ "" \ - { copyreloc-main.S } \ + { dummy.s } \ {{readelf {-Wr} copyreloc-main2.rd}} \ "copyreloc-main" \ ] \ @@ -681,9 +689,9 @@ if { [isnative] ] \ [list \ "Run copyreloc-main with PIE and GOTOFF" \ - "tmpdir/copyreloc-lib.so -pie" \ + "--as-needed tmpdir/copyreloc-main.o tmpdir/copyreloc-lib.so -pie" \ "" \ - { copyreloc-main.S } \ + { dummy.s } \ "copyreloc-main" \ "copyreloc-main.out" \ ] \ |