diff options
author | Alan Modra <amodra@gmail.com> | 2016-07-20 15:06:49 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-07-21 11:30:34 +0930 |
commit | 5df1bc570fcc5ef5257b7a044acdaeb6b95b9822 (patch) | |
tree | b0992244c629eaa0646c2dfd99dcf6487066f4f3 /ld/testsuite/ld-elf/elf.exp | |
parent | c092a4d9154f09e6c67648efb723878d7a74f44f (diff) | |
download | gdb-5df1bc570fcc5ef5257b7a044acdaeb6b95b9822.zip gdb-5df1bc570fcc5ef5257b7a044acdaeb6b95b9822.tar.gz gdb-5df1bc570fcc5ef5257b7a044acdaeb6b95b9822.tar.bz2 |
Fix implib test failures
bfd/
* elf.c (_bfd_elf_filter_global_symbols): Skip local symbols.
(swap_out_syms): Return an error when not finding ELF output
section rather than asserting.
* elflink.c (elf_output_implib): Call bfd_set_error on no symbols.
ld/
* testsuite/lib/ld-lib.exp (run_ld_link_tests): Add optional
parameter to pass list of xfails.
* testsuite/ld-elf/elf.exp: Add xfails for implib tests. Tidy
implib test formatting. Don't set .data start address.
* testsuite/ld-elf/implib.s: Remove first .bss directive and
replace second one with equivalent .section directive.
* testsuite/ld-elf/empty-implib.out: Add expected final error.
* testsuite/ld-elf/implib.rd: Update.
Diffstat (limited to 'ld/testsuite/ld-elf/elf.exp')
-rw-r--r-- | ld/testsuite/ld-elf/elf.exp | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp index 832f313..b67105f 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -136,21 +136,40 @@ foreach t $test_list { run_dump_test [file rootname $t] } +# Targets using the generic linker backend don't support generating +# an import library. +set xfail_implib "" +if { [istarget "d30v-*-*"] + || [istarget "dlx-*-*"] + || [istarget "fr30-*-*"] + || ([istarget "frv-*-*"] && ![istarget "frv-*-linux*"]) + || [istarget "ft32-*-*"] + || [istarget "i860-*-*"] + || [istarget "i960-*-*"] + || [istarget "iq2000-*-*"] + || [istarget "mn10200-*-*"] + || [istarget "moxie-*-*"] + || [istarget "msp430-*-*"] + || [istarget "mt-*-*"] + || [istarget "pj*-*-*"] } { + set xfail_implib "*-*-*" +} + # Check that the --out-implib option work correctly. run_ld_link_tests { {"Generate empty import library" - "--out-implib=tmpdir/implib.lib" "" - "--defsym NO_GLOBAL=1" - {implib.s} - {{ld empty-implib.out}} - "implib"} + "--out-implib=tmpdir/implib.lib" "" + "--defsym NO_GLOBAL=1" + {implib.s} + {{ld empty-implib.out}} + "implib"} {"Generate import library" - "-Tdata=0x1000 --out-implib=tmpdir/implib.lib" "" - "" - {implib.s} - {{readelf {-s tmpdir/implib.lib} implib.rd}} - "implib"} -} + "--out-implib=tmpdir/implib.lib" "" + "" + {implib.s} + {{readelf {-s tmpdir/implib.lib} implib.rd}} + "implib"} +} $xfail_implib if { [istarget *-*-linux*] || [istarget *-*-nacl*] |