This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] MIPS/LD/testsuite: Resurrect `branch-misc-2' test
- From: Maciej W.Rozycki <macro at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 2 Jul 2016 22:51:51 -0000
- Subject: [binutils-gdb] MIPS/LD/testsuite: Resurrect `branch-misc-2' test
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6f50d611582fab3ca8cf70ec3acf79e19c8706c4
commit 6f50d611582fab3ca8cf70ec3acf79e19c8706c4
Author: Maciej W. Rozycki <macro@imgtec.com>
Date: Sat Jul 2 23:14:20 2016 +0100
MIPS/LD/testsuite: Resurrect `branch-misc-2' test
Revert:
commit c9c1e416d7dd1a35bd7c1a96d034dca1d5071cd1
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Dec 12 04:39:44 2002 +0000
<https://sourceware.org/ml/binutils/2002-11/msg00657.html>, ("mips:
branches to external labels are broken"), complementing:
commit bad36eacdad37042c4efb1c5fbf48476b47de82b
Author: Daniel Jacobowitz <drow@false.org>
Date: Wed Nov 23 14:04:18 2005 +0000
<https://sourceware.org/ml/binutils/2005-11/msg00324.html>,
("R_MIPS_PC16, again").
ld/
* testsuite/ld-mips-elf/branch-misc-2.d: New test.
* testsuite/ld-mips-elf/mips-elf.exp: Run it.
Diff:
---
ld/ChangeLog | 5 +++++
ld/testsuite/ld-mips-elf/branch-misc-2.d | 30 ++++++++++++++++++++++++++++++
ld/testsuite/ld-mips-elf/mips-elf.exp | 1 +
3 files changed, 36 insertions(+)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index f53a2ed..1dc221d 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2016-07-02 Maciej W. Rozycki <macro@imgtec.com>
+
+ * testsuite/ld-mips-elf/branch-misc-2.d: New test.
+ * testsuite/ld-mips-elf/mips-elf.exp: Run it.
+
2016-07-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
* testsuite/ld-arm/arm-elf.exp (Thumb-2 BL): Assemble for ARMv7.
diff --git a/ld/testsuite/ld-mips-elf/branch-misc-2.d b/ld/testsuite/ld-mips-elf/branch-misc-2.d
new file mode 100644
index 0000000..d06783a
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/branch-misc-2.d
@@ -0,0 +1,30 @@
+#name: MIPS branch-misc-2
+#source: ../../../gas/testsuite/gas/mips/branch-misc-2.s
+#objdump: --prefix-addresses -tdr --show-raw-insn
+#ld: -Ttext 0x500000 -e 0x500000 -N
+
+.*: file format elf.*mips.*
+
+#...
+
+Disassembly of section \.text:
+ \.\.\.
+ \.\.\.
+ \.\.\.
+0+50003c <[^>]*> 0411fff0 bal 0+500000 <[^>]*>
+0+500040 <[^>]*> 00000000 nop
+0+500044 <[^>]*> 0411fff3 bal 0+500014 <[^>]*>
+0+500048 <[^>]*> 00000000 nop
+0+50004c <[^>]*> 0411fff6 bal 0+500028 <[^>]*>
+0+500050 <[^>]*> 00000000 nop
+0+500054 <[^>]*> 0411000a bal 0+500080 <[^>]*>
+0+500058 <[^>]*> 00000000 nop
+0+50005c <[^>]*> 0411000d bal 0+500094 <[^>]*>
+0+500060 <[^>]*> 00000000 nop
+0+500064 <[^>]*> 04110010 bal 0+5000a8 <[^>]*>
+0+500068 <[^>]*> 00000000 nop
+ \.\.\.
+ \.\.\.
+ \.\.\.
+ \.\.\.
+#pass
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 0d5842f..f4202f4 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -142,6 +142,7 @@ run_dump_test "mips16-1"
# MIPS branch offset final link checking.
run_dump_test "branch-misc-1"
+run_dump_test "branch-misc-2"
run_dump_test "mips16-branch-2" [list [list ld $abi_ldflags(o32)]]
run_dump_test "mips16-branch-3" [list [list ld $abi_ldflags(o32)]]