]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd/
authorRichard Sandiford <rdsandiford@googlemail.com>
Sun, 15 May 2011 19:04:56 +0000 (19:04 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Sun, 15 May 2011 19:04:56 +0000 (19:04 +0000)
* 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.

bfd/ChangeLog
bfd/elfxx-mips.c
ld/testsuite/ChangeLog
ld/testsuite/ld-mips-elf/mips-elf.exp
ld/testsuite/lib/ld-lib.exp

index dea69f59d04839251db34829c4c47e199c011064..910d8bc04b20438300903d56f3b3460d454b684f 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-15  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
+       global GOT entries for GOT_PAGE relocations against global symbols.
+
 2011-05-15  Richard Sandiford  <rdsandiford@googlemail.com>
 
        PR ld/12637
index ea3b53f4889b49d81b06d20ede5f08ad5e0257f9..455627c38b50a062aaedc15df40f497dacf82e89 100644 (file)
@@ -7740,7 +7740,6 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
              if (!mips_elf_record_got_page_entry (info, abfd, r_symndx,
                                                   addend))
                return FALSE;
-             break;
            }
          /* Fall through.  */
 
index be7772955f2c32e39c076dfe3bd681a2cdde33de..8c7d51570f408404dd8956a2b5d703da6c0164ea 100644 (file)
@@ -1,3 +1,10 @@
+2011-05-15  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * 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.
+
 2011-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
 
        * ld-arm/cortex-a8-fix-b-plt.s, ld-arm/cortex-a8-fix-b-plt.d,
index 6c283e206b19e80368f7dcee1f461d840eb8bc3d..d72ce484fbfb64dae5ec5e76ccca6aacfeb4cdd7 100644 (file)
@@ -293,6 +293,18 @@ if {$has_newabi} {
 }
 run_dump_test "reloc-4"
 run_dump_test "reloc-5"
+if { $has_newabi } {
+    run_ld_link_tests {
+       {"reloc test 6a" "-shared"
+        "-n32" "reloc-6a.s"
+        {}
+        "reloc-6a.so"}
+       {"reloc test 6b" "tmpdir/reloc-6a.so"
+        "-n32" "reloc-6b.s"
+        {}
+        "reloc-6b"}
+    }
+}
 
 if {$has_newabi && $linux_gnu} {
     run_dump_test "eh-frame1-n32"
index 48e9635d03f337741769f35c66a1e654e2e0ff1a..f444da7c83b0e2b4daaad4d16919b67f3d98144b 100644 (file)
@@ -980,26 +980,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]
@@ -1036,10 +1031,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
 
@@ -1081,18 +1073,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
        }
     }
 }