+2016-03-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * 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.
+
2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
PR ld/19579
"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" \
] \
] \
[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" \
] \
"copyreloc-lib.so" \
] \
[list \
- "Build copyreloc-main with PIE without -fPIE (1)" \
- "tmpdir/copyreloc-lib.so -pie" \
+ "Build libcopyreloc-main.a" \
+ "" \
"" \
{ copyreloc-main.S } \
+ {} \
+ "libcopyreloc-main.a" \
+ ] \
+ [list \
+ "Build copyreloc-main with PIE without -fPIE (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 without -fPIE (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" \
] \
] \
[list \
"Run copyreloc-main with PIE without -fPIE" \
- "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" \
] \