mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
Update x86-64 tests for --as-needed
Since compiler may pass --as-needed to ld by default, link .o file before .so file in x86-64 tests. PR ld/19774 * testsuite/ld-x86-64/x86-64.exp: Link tmpdir/pr17689b.o before tmpdir/pr17689.so, fix gotpcrel1 test and add more --as-needed tests.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2016-04-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
PR ld/19774
|
||||||
|
* testsuite/ld-x86-64/x86-64.exp: Link tmpdir/pr17689b.o before
|
||||||
|
tmpdir/pr17689.so, fix gotpcrel1 test and add more --as-needed
|
||||||
|
tests.
|
||||||
|
|
||||||
2016-04-11 H.J. Lu <hongjiu.lu@intel.com>
|
2016-04-11 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR ld/19939
|
PR ld/19939
|
||||||
|
@ -630,26 +630,33 @@ if { [isnative] && [which $CC] != 0 } {
|
|||||||
"pr17689now.so" \
|
"pr17689now.so" \
|
||||||
] \
|
] \
|
||||||
[list \
|
[list \
|
||||||
"Build pr17689 with PIE without -fPIE" \
|
"Build pr17689b.o" \
|
||||||
"tmpdir/pr17689.so -pie" \
|
"" \
|
||||||
"" \
|
"" \
|
||||||
{ pr17689b.S } \
|
{ pr17689b.S } \
|
||||||
|
{} \
|
||||||
|
] \
|
||||||
|
[list \
|
||||||
|
"Build pr17689 with PIE without -fPIE" \
|
||||||
|
"tmpdir/pr17689b.o tmpdir/pr17689.so -pie" \
|
||||||
|
"" \
|
||||||
|
{ dummy.s } \
|
||||||
{{readelf {-Wr} pr17689.rd}} \
|
{{readelf {-Wr} pr17689.rd}} \
|
||||||
"pr17689" \
|
"pr17689" \
|
||||||
] \
|
] \
|
||||||
[list \
|
[list \
|
||||||
"Build pr17689 with PIE -z now without -fPIE" \
|
"Build pr17689 with PIE -z now without -fPIE" \
|
||||||
"tmpdir/pr17689.so -pie -Wl,-z,now" \
|
"tmpdir/pr17689b.o tmpdir/pr17689.so -pie -Wl,-z,now" \
|
||||||
"" \
|
"" \
|
||||||
{ pr17689b.S } \
|
{ dummy.s } \
|
||||||
{{readelf {-Wr} pr17689now.rd}} \
|
{{readelf {-Wr} pr17689now.rd}} \
|
||||||
"pr17689now" \
|
"pr17689now" \
|
||||||
] \
|
] \
|
||||||
[list \
|
[list \
|
||||||
"Build pr17827 with PIE without -fPIE" \
|
"Build pr17827 with PIE without -fPIE" \
|
||||||
"tmpdir/pr17689.so -pie" \
|
"-Wl,--as-needed tmpdir/pr17689b.o tmpdir/pr17689.so -pie" \
|
||||||
"" \
|
"" \
|
||||||
{ pr17689b.S } \
|
{ dummy.s } \
|
||||||
{{readelf {-Wr} pr17827.rd}} \
|
{{readelf {-Wr} pr17827.rd}} \
|
||||||
"pr17827" \
|
"pr17827" \
|
||||||
] \
|
] \
|
||||||
@ -702,10 +709,18 @@ if { [isnative] && [which $CC] != 0 } {
|
|||||||
"gotpcrel1d.so" \
|
"gotpcrel1d.so" \
|
||||||
] \
|
] \
|
||||||
[list \
|
[list \
|
||||||
"Build gotpcrel1" \
|
"Build libgotpcrel1.a" \
|
||||||
"tmpdir/gotpcrel1d.so" \
|
"" \
|
||||||
"-Wa,-mrelax-relocations=yes" \
|
"" \
|
||||||
{ gotpcrel1a.S gotpcrel1b.c gotpcrel1c.c } \
|
{ gotpcrel1a.S gotpcrel1b.c gotpcrel1c.c } \
|
||||||
|
"" \
|
||||||
|
"libgotpcrel1.a" \
|
||||||
|
] \
|
||||||
|
[list \
|
||||||
|
"Build gotpcrel1" \
|
||||||
|
"-Wl,--as-needed tmpdir/gotpcrel1a.o tmpdir/gotpcrel1b.o tmpdir/gotpcrel1c.o tmpdir/gotpcrel1d.so" \
|
||||||
|
"-Wa,-mrelax-relocations=yes" \
|
||||||
|
{ dummy.s } \
|
||||||
{{objdump {-dw} gotpcrel1.dd}} \
|
{{objdump {-dw} gotpcrel1.dd}} \
|
||||||
"gotpcrel1" \
|
"gotpcrel1" \
|
||||||
] \
|
] \
|
||||||
@ -757,17 +772,17 @@ if { [isnative] && [which $CC] != 0 } {
|
|||||||
] \
|
] \
|
||||||
[list \
|
[list \
|
||||||
"Run pr17689 with PIE without -fPIE" \
|
"Run pr17689 with PIE without -fPIE" \
|
||||||
"tmpdir/pr17689.so -pie" \
|
"tmpdir/pr17689b.o tmpdir/pr17689.so -pie" \
|
||||||
"" \
|
"" \
|
||||||
{ pr17689b.S } \
|
{ dummy.s } \
|
||||||
"pr17689" \
|
"pr17689" \
|
||||||
"pr17689.out" \
|
"pr17689.out" \
|
||||||
] \
|
] \
|
||||||
[list \
|
[list \
|
||||||
"Run pr17689 with PIE -z now without -fPIE" \
|
"Run pr17689 with PIE -z now without -fPIE" \
|
||||||
"tmpdir/pr17689.so -pie -z now" \
|
"--as-needed tmpdir/pr17689b.o tmpdir/pr17689.so -pie -z now" \
|
||||||
"" \
|
"" \
|
||||||
{ pr17689b.S } \
|
{ dummy.s } \
|
||||||
"pr17689now" \
|
"pr17689now" \
|
||||||
"pr17689.out" \
|
"pr17689.out" \
|
||||||
] \
|
] \
|
||||||
|
Reference in New Issue
Block a user