[committed] MIPS/BFD: Don't stop processing on `bfd_reloc_outofrange'
Maciej W. Rozycki
macro@imgtec.com
Thu May 26 11:31:00 GMT 2016
Upon a `bfd_reloc_outofrange' error continue processing so that any
further issues are also reported, similarly to how `bfd_reloc_overflow'
is handled. Adjust message formatting accordingly, using `%X' to abort
processing at conclusion.
Reduce the number of test cases by grouping relocations the handling of
which can now be verified together with a single source and dump.
bfd/
* elfxx-mips.c (_bfd_mips_elf_relocate_section)
<bfd_reloc_outofrange>: Use the `%X%H' rather than `%C' format
for message. Continue processing rather than returning failure.
ld/
* testsuite/ld-mips-elf/unaligned-jalx-0.d: Fold
`unaligned-jalx-2' here.
* testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d: Fold
`unaligned-jalx-mips16-2' here.
* testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d: Fold
`unaligned-jalx-micromips-2' here.
* testsuite/ld-mips-elf/unaligned-jalx-0.s: Update accordingly.
* testsuite/ld-mips-elf/unaligned-jalx-1.d: Update error
message.
* testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-2.d: Remove test.
* testsuite/ld-mips-elf/unaligned-jalx-mips16-2.d: Remove test.
* testsuite/ld-mips-elf/unaligned-jalx-micromips-2.d: Remove
test.
* testsuite/ld-mips-elf/unaligned-jalx-2.s: Remove test source.
* testsuite/ld-mips-elf/unaligned-lwpc-0.d: Fold
`unaligned-lwpc-3' here.
* testsuite/ld-mips-elf/unaligned-lwpc-0.s: Update accordingly.
* testsuite/ld-mips-elf/unaligned-lwpc-1.d: Fold
`unaligned-lwpc-2' here.
* testsuite/ld-mips-elf/unaligned-lwpc-1.s: Update accordingly.
* testsuite/ld-mips-elf/unaligned-lwpc-2.d: Remove test.
* testsuite/ld-mips-elf/unaligned-lwpc-2.s: Remove test source.
* testsuite/ld-mips-elf/unaligned-lwpc-3.d: Remove test.
* testsuite/ld-mips-elf/unaligned-lwpc-3.s: Remove test source.
* testsuite/ld-mips-elf/unaligned-ldpc-0.d: Fold
`unaligned-ldpc-4' here.
* testsuite/ld-mips-elf/unaligned-ldpc-0.s: Update accordingly.
* testsuite/ld-mips-elf/unaligned-ldpc-1.d: Update error
message. Fold `unaligned-ldpc-2' and `unaligned-ldpc-3' here.
* testsuite/ld-mips-elf/unaligned-ldpc-1.s: Update accordingly.
* testsuite/ld-mips-elf/unaligned-ldpc-2.d: Remove test.
* testsuite/ld-mips-elf/unaligned-ldpc-2.s: Remove test source.
* testsuite/ld-mips-elf/unaligned-ldpc-3.d: Remove test.
* testsuite/ld-mips-elf/unaligned-ldpc-3.s: Remove test source.
* testsuite/ld-mips-elf/unaligned-ldpc-4.d: Remove test.
* testsuite/ld-mips-elf/unaligned-ldpc-4.s: Remove test source.
* testsuite/ld-mips-elf/mips-elf.exp: Delete removed tests.
---
I have realised we can do a better job here and refrain from aborting on
the first failure, so that the user can see all the errors and address
them all at once rather than going one by one. The effect of this is
already seen with the test suite reduction. Committed now.
Maciej
binutils-mips-bfd-reloc-range-msg-error-update.diff
Index: binutils/bfd/elfxx-mips.c
===================================================================
--- binutils.orig/bfd/elfxx-mips.c 2016-05-26 00:04:47.000000000 +0100
+++ binutils/bfd/elfxx-mips.c 2016-05-26 00:33:42.647790912 +0100
@@ -10267,9 +10267,8 @@ _bfd_mips_elf_relocate_section (bfd *out
if (msg)
{
info->callbacks->einfo
- ("%C: %s\n", input_bfd, input_section, rel->r_offset, msg);
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ ("%X%H: %s\n", input_bfd, input_section, rel->r_offset, msg);
+ break;
}
/* Fall through. */
Index: binutils/ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/mips-elf.exp 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/mips-elf.exp 2016-05-26 00:16:03.811300284 +0100
@@ -179,23 +179,15 @@ if $has_newabi {
run_dump_test "unaligned-jalx-0" [list [list ld $abi_ldflags(o32)]]
run_dump_test "unaligned-jalx-1" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-jalx-2" [list [list ld $abi_ldflags(o32)]]
run_dump_test "unaligned-jalx-mips16-0" [list [list ld $abi_ldflags(o32)]]
run_dump_test "unaligned-jalx-mips16-1" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-jalx-mips16-2" [list [list ld $abi_ldflags(o32)]]
run_dump_test "unaligned-jalx-micromips-0" [list [list ld $abi_ldflags(o32)]]
run_dump_test "unaligned-jalx-micromips-1" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-jalx-micromips-2" [list [list ld $abi_ldflags(o32)]]
run_dump_test "unaligned-lwpc-0" [list [list ld $abi_ldflags(o32)]]
run_dump_test "unaligned-lwpc-1" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-lwpc-2" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-lwpc-3" [list [list ld $abi_ldflags(o32)]]
run_dump_test "unaligned-ldpc-0" [list [list ld $abi_ldflags(o32)]]
run_dump_test "unaligned-ldpc-1" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-ldpc-2" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-ldpc-3" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-ldpc-4" [list [list ld $abi_ldflags(o32)]]
# Test multi-got link. We only do this on GNU/Linux because it requires
# the "traditional" emulations.
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-0.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-0.d 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-0.d 2016-05-26 00:16:47.070251071 +0100
@@ -10,6 +10,8 @@
Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 77000008 jalx 1c000020 <bar0>
[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 77000009 jalx 1c000024 <bar2>
+[0-9a-f]+ <[^>]*> 00000000 nop
\.\.\.
\.\.\.
\.\.\.
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-0.s
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-0.s 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-0.s 2016-05-26 00:17:27.416270944 +0100
@@ -4,6 +4,7 @@
.ent foo
foo:
jal bar0
+ jal bar2
.end foo
# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-1.d 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-1.d 2016-05-26 00:18:02.809423371 +0100
@@ -4,5 +4,4 @@
#as: -EB -32
#ld: -EB -Ttext 0x1c000000 -e 0x1c000000
#error: \A[^\n]*: In function `foo':\n
-#error: \(\.text\+0x[0-9a-f]+\): JALX to a non-word-aligned address\n
-#error: [^\n]*: final link failed: Bad value\Z
+#error: \(\.text\+0x[0-9a-f]+\): JALX to a non-word-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-2.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-2.d 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-#name: MIPS JALX to unaligned symbol 2
-#source: unaligned-jalx-2.s
-#source: unaligned-insn.s -mips16
-#as: -EB -32
-#ld: -EB -Ttext 0x1c000000 -e 0x1c000000
-#objdump: -dr --prefix-addresses --show-raw-insn
-
-.*: +file format .*mips.*
-
-Disassembly of section \.text:
-[0-9a-f]+ <[^>]*> 77000009 jalx 1c000024 <bar2>
-[0-9a-f]+ <[^>]*> 00000000 nop
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-2.s
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-2.s 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
- .text
- .align 4
- .globl foo
- .ent foo
-foo:
- jal bar2
- .end foo
-
-# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
- .align 4, 0
- .space 16
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d 2016-05-26 00:18:42.518869924 +0100
@@ -10,6 +10,8 @@
Disassembly of section \.text:
[0-9a-f]+ <[^>]*> f300 0008 jalx 1c000020 <bar0>
[0-9a-f]+ <[^>]*> 0000 0000 nop
+[0-9a-f]+ <[^>]*> f300 0009 jalx 1c000024 <bar2>
+[0-9a-f]+ <[^>]*> 0000 0000 nop
\.\.\.
\.\.\.
\.\.\.
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d 2016-05-26 00:19:00.244495978 +0100
@@ -4,5 +4,4 @@
#as: -EB -32
#ld: -EB -Ttext 0x1c000000 -e 0x1c000000
#error: \A[^\n]*: In function `foo':\n
-#error: \(\.text\+0x[0-9a-f]+\): JALX to a non-word-aligned address\n
-#error: [^\n]*: final link failed: Bad value\Z
+#error: \(\.text\+0x[0-9a-f]+\): JALX to a non-word-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-2.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-2.d 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-#name: microMIPS JALX to unaligned symbol 2
-#source: unaligned-jalx-2.s -mmicromips
-#source: unaligned-insn.s
-#as: -EB -32
-#ld: -EB -Ttext 0x1c000000 -e 0x1c000000
-#objdump: -dr --prefix-addresses --show-raw-insn
-
-.*: +file format .*mips.*
-
-Disassembly of section \.text:
-[0-9a-f]+ <[^>]*> f300 0009 jalx 1c000024 <bar2>
-[0-9a-f]+ <[^>]*> 0000 0000 nop
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d 2016-05-26 00:19:23.637539094 +0100
@@ -10,6 +10,8 @@
Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 1c18 0008 jalx 1c000020 <bar0>
[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> 1c18 0009 jalx 1c000024 <bar2>
+[0-9a-f]+ <[^>]*> 6500 nop
\.\.\.
\.\.\.
\.\.\.
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d 2016-05-26 00:19:33.810283669 +0100
@@ -4,5 +4,4 @@
#as: -EB -32
#ld: -EB -Ttext 0x1c000000 -e 0x1c000000
#error: \A[^\n]*: In function `foo':\n
-#error: \(\.text\+0x[0-9a-f]+\): JALX to a non-word-aligned address\n
-#error: [^\n]*: final link failed: Bad value\Z
+#error: \(\.text\+0x[0-9a-f]+\): JALX to a non-word-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-2.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-2.d 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-#name: MIPS16 JALX to unaligned symbol 2
-#source: unaligned-jalx-2.s -mips16
-#source: unaligned-insn.s
-#as: -EB -32
-#ld: -EB -Ttext 0x1c000000 -e 0x1c000000
-#objdump: -dr --prefix-addresses --show-raw-insn
-
-.*: +file format .*mips.*
-
-Disassembly of section \.text:
-[0-9a-f]+ <[^>]*> 1c18 0009 jalx 1c000024 <bar2>
-[0-9a-f]+ <[^>]*> 6500 nop
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
- \.\.\.
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.d 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.d 2016-05-26 00:21:15.597448622 +0100
@@ -9,4 +9,5 @@
Disassembly of section \.text:
[0-9a-f]+ <[^>]*> ec590004 ldpc v0,1c080020 <bar0>
+[0-9a-f]+ <[^>]*> ec590005 ldpc v0,1c080028 <bar8>
\.\.\.
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.s
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.s 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.s 2016-05-26 00:21:30.623354318 +0100
@@ -4,6 +4,7 @@
.ent foo
foo:
ldpc $2, bar0
+ ldpc $2, bar8
.end foo
# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.d 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.d 2016-05-26 00:57:52.651916826 +0100
@@ -5,4 +5,7 @@
#ld: -EB -Ttext 0x1c000000 -Tdata 0x1c080000 -e 0x1c000000
#error: \A[^\n]*: In function `foo':\n
#error: \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\n
-#error: [^\n]*: final link failed: Bad value\Z
+#error: [^\n]*: In function `foo':\n
+#error: \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\n
+#error: [^\n]*: In function `foo':\n
+#error: \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.s
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.s 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.s 2016-05-26 00:22:35.678788942 +0100
@@ -4,6 +4,8 @@
.ent foo
foo:
ldpc $2, bar1
+ ldpc $2, bar2
+ ldpc $2, bar4
.end foo
# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-2.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-ldpc-2.d 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,8 +0,0 @@
-#name: MIPS LDPC from unaligned symbol 2
-#source: unaligned-ldpc-2.s
-#source: unaligned-syms.s
-#as: -EB -32 -mips64r6
-#ld: -EB -Ttext 0x1c000000 -Tdata 0x1c080000 -e 0x1c000000
-#error: \A[^\n]*: In function `foo':\n
-#error: \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\n
-#error: [^\n]*: final link failed: Bad value\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-2.s
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-ldpc-2.s 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
- .text
- .align 4
- .globl foo
- .ent foo
-foo:
- ldpc $2, bar2
- .end foo
-
-# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
- .align 4, 0
- .space 16
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-3.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-ldpc-3.d 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,8 +0,0 @@
-#name: MIPS LDPC from unaligned symbol 3
-#source: unaligned-ldpc-3.s
-#source: unaligned-syms.s
-#as: -EB -32 -mips64r6
-#ld: -EB -Ttext 0x1c000000 -Tdata 0x1c080000 -e 0x1c000000
-#error: \A[^\n]*: In function `foo':\n
-#error: \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\n
-#error: [^\n]*: final link failed: Bad value\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-3.s
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-ldpc-3.s 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
- .text
- .align 4
- .globl foo
- .ent foo
-foo:
- ldpc $2, bar4
- .end foo
-
-# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
- .align 4, 0
- .space 16
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-4.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-ldpc-4.d 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-#name: MIPS LDPC from unaligned symbol 4
-#source: unaligned-ldpc-4.s
-#source: unaligned-syms.s
-#as: -EB -32 -mips64r6
-#ld: -EB -Ttext 0x1c000000 -Tdata 0x1c080000 -e 0x1c000000
-#objdump: -dr --prefix-addresses --show-raw-insn
-
-.*: +file format .*mips.*
-
-Disassembly of section \.text:
-[0-9a-f]+ <[^>]*> ec590005 ldpc v0,1c080028 <bar8>
- \.\.\.
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-4.s
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-ldpc-4.s 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
- .text
- .align 4
- .globl foo
- .ent foo
-foo:
- ldpc $2, bar8
- .end foo
-
-# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
- .align 4, 0
- .space 16
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.d 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.d 2016-05-26 00:23:53.218432055 +0100
@@ -9,4 +9,5 @@
Disassembly of section \.text:
[0-9a-f]+ <[^>]*> ec4a0008 lwpc v0,1c080020 <bar0>
+[0-9a-f]+ <[^>]*> ec4a0008 lwpc v0,1c080024 <bar4>
\.\.\.
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.s
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.s 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.s 2016-05-26 00:24:44.632783755 +0100
@@ -4,6 +4,7 @@
.ent foo
foo:
lwpc $2, bar0
+ lwpc $2, bar4
.end foo
# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.d 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.d 2016-05-26 00:58:10.142971844 +0100
@@ -5,4 +5,5 @@
#ld: -EB -Ttext 0x1c000000 -Tdata 0x1c080000 -e 0x1c000000
#error: \A[^\n]*: In function `foo':\n
#error: \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\n
-#error: [^\n]*: final link failed: Bad value\Z
+#error: [^\n]*: In function `foo':\n
+#error: \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.s
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.s 2016-05-25 21:17:01.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.s 2016-05-26 00:25:27.278872090 +0100
@@ -4,6 +4,7 @@
.ent foo
foo:
lwpc $2, bar1
+ lwpc $2, bar2
.end foo
# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-2.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-lwpc-2.d 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,8 +0,0 @@
-#name: MIPS LWPC from unaligned symbol 2
-#source: unaligned-lwpc-2.s
-#source: unaligned-syms.s
-#as: -EB -32 -mips32r6
-#ld: -EB -Ttext 0x1c000000 -Tdata 0x1c080000 -e 0x1c000000
-#error: \A[^\n]*: In function `foo':\n
-#error: \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\n
-#error: [^\n]*: final link failed: Bad value\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-2.s
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-lwpc-2.s 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
- .text
- .align 4
- .globl foo
- .ent foo
-foo:
- lwpc $2, bar2
- .end foo
-
-# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
- .align 4, 0
- .space 16
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-3.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-lwpc-3.d 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-#name: MIPS LWPC from unaligned symbol 3
-#source: unaligned-lwpc-3.s
-#source: unaligned-syms.s
-#as: -EB -32 -mips32r6
-#ld: -EB -Ttext 0x1c000000 -Tdata 0x1c080000 -e 0x1c000000
-#objdump: -dr --prefix-addresses --show-raw-insn
-
-.*: +file format .*mips.*
-
-Disassembly of section \.text:
-[0-9a-f]+ <[^>]*> ec4a0009 lwpc v0,1c080024 <bar4>
- \.\.\.
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-3.s
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-lwpc-3.s 2016-05-25 21:17:01.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
- .text
- .align 4
- .globl foo
- .ent foo
-foo:
- lwpc $2, bar4
- .end foo
-
-# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
- .align 4, 0
- .space 16
More information about the Binutils
mailing list