return
}
-# The following tests require running the executable generated by ld.
-if ![isnative] {
+# Skip targets where -shared is not supported
+
+if ![check_shared_lib_support] {
return
}
{"Build libdwarf1.so"
"-s -shared" "-fPIC -g -feliminate-dwarf2-dups"
{dwarf1.c} {} "libdwarf1.so"}
+ {"DWARF parse during linker error"
+ "" "-fno-toplevel-reorder"
+ {dwarf2a.c dwarf2b.c} {{error_output "dwarf2.err"}} "dwarf2.x"}
+ {"Handle no DWARF information"
+ "" "-g0"
+ {dwarf3.c} {{error_output "dwarf3.err"}} "dwarf3.x"}
}
set run_tests {
{"Run with libdwarf1.so first"
- "tmpdir/libdwarf1.so" ""
+ "-Wl,--no-as-needed tmpdir/libdwarf1.so" ""
{dwarf1main.c} "dwarf1a" "dwarf1.out"
"-g -feliminate-dwarf2-dups"}
{"Run with libdwarf1.so last"
set test_name "Strip -s $test"
set prog $strip
- if ![ld_simple_link $ld tmpdir/$test "-shared tmpdir/dwarf1.o"] {
+ if ![ld_link $ld tmpdir/$test "-shared tmpdir/dwarf1.o"] {
unresolved "$test_name"
return
}