]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/testsuite/ld-mips-elf/mips-elf.exp
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-mips-elf / mips-elf.exp
index d4298102910cbc85aa5f68a4db777c76482cfd01..3d620517554e25bac512e09a61896fbaf045651b 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for MIPS ELF linker tests
-#   Copyright (C) 2002-2018 Free Software Foundation, Inc.
+#   Copyright (C) 2002-2020 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -523,6 +523,12 @@ if { $linux_gnu } {
         {{objdump -dr pic-and-nonpic-1.dd}
          {readelf --symbols pic-and-nonpic-1.nd}}
         "pic-and-nonpic-1-static1.o"}
+       {"PIC and non-PIC test 1 R6 compact branches (static 1)"
+        "-melf32btsmip -Tpic-and-nonpic-1.ld --compact-branches" ""
+        "-32 -EB -mips32r6" {pic-and-nonpic-1a-r6.s pic-and-nonpic-1b.s}
+        {{objdump -dr pic-and-nonpic-1-r6.dd}
+         {readelf --symbols pic-and-nonpic-1-r6.nd}}
+        "pic-and-nonpic-1-r6-static1.o"}
        {"PIC and non-PIC test 1 (static 2)"
         "-melf32btsmip -Tpic-and-nonpic-1.ld tmpdir/pic-and-nonpic-1-rel.o" ""
         "" {}
@@ -586,6 +592,13 @@ if { $linux_gnu } {
          {readelf --symbols pic-and-nonpic-3b.nd}
          {readelf -d pic-and-nonpic-3b.ad}}
         "pic-and-nonpic-3b"}
+       {"PIC and non-PIC test 3 R6 compact branches (shared library)"
+        "-melf32btsmip -shared --compact-branches -Tpic-and-nonpic-3a.ld" ""
+        "-32 -EB -mips32r6" {pic-and-nonpic-3a-r6.s}
+        {{readelf --segments pic-and-nonpic-3a.sd}
+         {readelf -A pic-and-nonpic-3a-r6.gd}
+         {objdump -dr pic-and-nonpic-3a-r6.dd}}
+        "pic-and-nonpic-3a-r6.so"}
     }
     run_dump_test_o32 "pic-and-nonpic-3-error" {noarch {as -EB} {ld -EB}}
     run_ld_link_tests {
@@ -841,9 +854,8 @@ if { $linux_gnu } {
 
 run_dump_test_n32 "emit-relocs-1" {{as -EB} {ld -EB}}
 
-run_dump_test "hash1a"
-run_dump_test "hash1b"
-run_dump_test "hash1c"
+run_dump_test "hash1"
+run_dump_test "hash2"
 
 if { $linux_gnu && $has_abi(o32) } {
     # The number of symbols that are always included in the symbol table
@@ -1629,3 +1641,19 @@ if $has_abi(n64) {
     run_mips_undefweak_test "shared library (n64, microMIPS, hidden)" \
                                                    n64 dso umips hidden
 }
+
+# PIC relocation acceptance tests.
+run_dump_test "pic-reloc-0"
+run_dump_test "pic-reloc-1"
+run_dump_test "pic-reloc-2"
+run_dump_test "pic-reloc-3"
+run_dump_test "pic-reloc-4"
+run_dump_test_o32 "pic-reloc-5"
+run_dump_test_o32 "pic-reloc-5" [list [list name (microMIPS)] \
+                                     [list as "-mmicromips"]]
+run_dump_test_o32 "pic-reloc-6"
+run_dump_test_n64 "pic-reloc-7"
+run_dump_test_n64 "pic-reloc-7" [list [list name (microMIPS)] \
+                                     [list as "-mmicromips"]]
+
+run_dump_test_o32 "reloc-pcrel-r6"