aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/shared.exp
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elf/shared.exp')
-rw-r--r--ld/testsuite/ld-elf/shared.exp77
1 files changed, 41 insertions, 36 deletions
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 1247fd2..5c4d78a 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -90,44 +90,49 @@ run_ld_link_tests [list \
{} \
"pr22649-1.so" \
] \
- [list \
- "Build pr22649-2a.so" \
- "$LFLAGS -shared -gc-sections -print-gc-sections" \
- "" \
- "$AFLAGS_PIC" \
- {pr22649-2a.s} \
- {{ld pr22649.msg}} \
- "pr22649-2a.so" \
- ] \
- [list \
- "Build pr22649-2b.so" \
- "$LFLAGS -shared -gc-sections -print-gc-sections" \
- "tmpdir/pr22649-1.so" \
- "$AFLAGS_PIC" \
- {pr22649-2a.s} \
- {{ld pr22649.msg}} \
- "pr22649-2b.so" \
- ] \
- [list \
- "Build pr22649-2c.so" \
- "$LFLAGS -shared -gc-sections -print-gc-sections" \
- "" \
- "$AFLAGS_PIC" \
- {pr22649-2b.s} \
- {} \
- "pr22649-2b.so" \
- ] \
- [list \
- "Build pr22649-2d.so" \
- "$LFLAGS -shared -gc-sections -print-gc-sections" \
- "tmpdir/pr22649-1.so" \
- "$AFLAGS_PIC" \
- {pr22649-2b.s} \
- {} \
- "pr22649-2b.so" \
- ] \
]
+if { [check_gc_sections_available] } {
+ run_ld_link_tests [list \
+ [list \
+ "Build pr22649-2a.so" \
+ "$LFLAGS -shared -gc-sections -print-gc-sections" \
+ "" \
+ "$AFLAGS_PIC" \
+ {pr22649-2a.s} \
+ {{ld pr22649.msg}} \
+ "pr22649-2a.so" \
+ ] \
+ [list \
+ "Build pr22649-2b.so" \
+ "$LFLAGS -shared -gc-sections -print-gc-sections" \
+ "tmpdir/pr22649-1.so" \
+ "$AFLAGS_PIC" \
+ {pr22649-2a.s} \
+ {{ld pr22649.msg}} \
+ "pr22649-2b.so" \
+ ] \
+ [list \
+ "Build pr22649-2c.so" \
+ "$LFLAGS -shared -gc-sections -print-gc-sections" \
+ "" \
+ "$AFLAGS_PIC" \
+ {pr22649-2b.s} \
+ {} \
+ "pr22649-2b.so" \
+ ] \
+ [list \
+ "Build pr22649-2d.so" \
+ "$LFLAGS -shared -gc-sections -print-gc-sections" \
+ "tmpdir/pr22649-1.so" \
+ "$AFLAGS_PIC" \
+ {pr22649-2b.s} \
+ {} \
+ "pr22649-2b.so" \
+ ] \
+ ]
+}
+
run_ld_link_tests [list \
[list \
"DT_TEXTREL in shared lib" \