aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ifunc/ifunc.exp
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-03-08 08:43:12 -0800
committerH.J. Lu <hjl.tools@gmail.com>2016-03-08 08:45:04 -0800
commit205ac185771460838370afb3a38d20228927b925 (patch)
treeff9e458c0ab3a915b253c7aad96f358a1502fe3d /ld/testsuite/ld-ifunc/ifunc.exp
parent202ac193bbbecc96a4978d1ac3d17148253f9b01 (diff)
downloadgdb-205ac185771460838370afb3a38d20228927b925.zip
gdb-205ac185771460838370afb3a38d20228927b925.tar.gz
gdb-205ac185771460838370afb3a38d20228927b925.tar.bz2
Support --as-needed in ifunc tests
Since compiler may pass --as-needed to ld by default, link .o file before .so file in ifunc tests. PR ld/19774 * testsuite/ld-ifunc/ifunc.exp: Link tmpdir/pr18808a.o before tmpdir/libpr18808.so. Link tmpdir/pr18841a.o before tmpdir/libpr18841b.so and tmpdir/libpr18841c.so. Test --as-needed for pr18841c.
Diffstat (limited to 'ld/testsuite/ld-ifunc/ifunc.exp')
-rw-r--r--ld/testsuite/ld-ifunc/ifunc.exp28
1 files changed, 22 insertions, 6 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp
index 5a5bf72..96627e7 100644
--- a/ld/testsuite/ld-ifunc/ifunc.exp
+++ b/ld/testsuite/ld-ifunc/ifunc.exp
@@ -466,6 +466,14 @@ if { ![check_ifunc_attribute_available] } {
run_cc_link_tests [list \
[list \
+ "Build pr18808a.o" \
+ "" \
+ "" \
+ { pr18808a.c } \
+ "" \
+ "" \
+ ] \
+ [list \
"Build libpr18808.so" \
"-shared" \
"-fPIC -O2 -g" \
@@ -474,6 +482,14 @@ run_cc_link_tests [list \
"libpr18808.so" \
] \
[list \
+ "Build pr18841a.o" \
+ "" \
+ "" \
+ { pr18841a.c } \
+ "" \
+ "" \
+ ] \
+ [list \
"Build libpr18841b.so" \
"-shared" \
"-fPIC -O0 -g" \
@@ -494,25 +510,25 @@ run_cc_link_tests [list \
run_ld_link_exec_tests [] [list \
[list \
"Run pr18808" \
- "tmpdir/libpr18808.so" \
+ "tmpdir/pr18808a.o tmpdir/libpr18808.so" \
"" \
- { pr18808a.c } \
+ { dummy.c } \
"pr18808" \
"pr18808.out" \
] \
[list \
"Run pr18841 with libpr18841b.so" \
- "tmpdir/libpr18841b.so" \
+ "tmpdir/pr18841a.o tmpdir/libpr18841b.so" \
"" \
- { pr18841a.c } \
+ { dummy.c } \
"pr18841b" \
"pr18841.out" \
] \
[list \
"Run pr18841 with libpr18841c.so" \
- "tmpdir/libpr18841c.so" \
+ "--as-needed tmpdir/pr18841a.o tmpdir/libpr18841c.so" \
"" \
- { pr18841a.c } \
+ { dummy.c } \
"pr18841c" \
"pr18841.out" \
] \