diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2011-05-15 18:52:01 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2011-05-15 18:52:01 +0000 |
commit | 77c56f443d3ef7b5350fb3c7a27510840cb6bb4c (patch) | |
tree | af350d0d1cb57e62debbd8321ebbcac92aea205d /ld/testsuite/lib | |
parent | 75fc9810e329b582cff578f08574432c90442fea (diff) | |
download | gdb-77c56f443d3ef7b5350fb3c7a27510840cb6bb4c.zip gdb-77c56f443d3ef7b5350fb3c7a27510840cb6bb4c.tar.gz gdb-77c56f443d3ef7b5350fb3c7a27510840cb6bb4c.tar.bz2 |
bfd/
* elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
global GOT entries for GOT_PAGE relocations against global symbols.
ld/testsuite/
* lib/ld-lib.exp (run_ld_link_tests): Simplify pass/fail logic.
Fail if the link command fails and if no test rules are defined.
* ld-mips-elf/reloc-6a.s, ld-mips-elf/reloc-6b.s: New tests.
* ld-mips-elf/mips-elf.exp: Run them.
Diffstat (limited to 'ld/testsuite/lib')
-rw-r--r-- | ld/testsuite/lib/ld-lib.exp | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index 2fb8c4a..34de7c8 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -978,26 +978,21 @@ proc run_ld_link_tests { ldtests } { } # Catch assembler errors. - if { $is_unresolved != 0 } { + if { $is_unresolved } { unresolved $testname continue } if { [regexp ".*\\.a$" $binfile] } { if { ![ar_simple_create $ar $ld_options $binfile "$objfiles"] } { - fail $testname set failed 1 - } else { - set failed 0 } } elseif { ![ld_simple_link $ld $binfile "-L$srcdir/$subdir $ld_options $objfiles"] } { set maybe_failed 1 set ld_output "$exec_output" - } else { - set failed 0 } - if { $failed == 0 } { + if { !$failed } { foreach actionlist $actions { set action [lindex $actionlist 0] set progopts [lindex $actionlist 1] @@ -1034,10 +1029,7 @@ proc run_ld_link_tests { ldtests } { break } set maybe_failed 0 - } elseif { $maybe_failed != 0 } { - set failed 1 - break - } elseif { $dump_prog != "" } { + } elseif { !$maybe_failed && $dump_prog != "" } { set dumpfile [lindex $actionlist 2] set binary $dump_prog @@ -1079,18 +1071,14 @@ proc run_ld_link_tests { ldtests } { remote_file host delete "dump.out" } } - - if { $failed != 0 } { - fail $testname - } else { if { $is_unresolved == 0 } { - pass $testname - } } } - # Catch action errors. - if { $is_unresolved != 0 } { + if { $is_unresolved } { unresolved $testname - continue + } elseif { $maybe_failed || $failed } { + fail $testname + } else { + pass $testname } } } |