From: Maciej W. Rozycki Date: Thu, 26 May 2016 11:24:45 +0000 (+0100) Subject: MIPS/BFD: Don't stop processing on `bfd_reloc_outofrange' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ed53407eec9e;p=binutils-gdb.git MIPS/BFD: Don't stop processing on `bfd_reloc_outofrange' 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) : 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3250acc72c6..bb9cb3c5e07 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ +2016-05-26 Maciej W. Rozycki + + * elfxx-mips.c (_bfd_mips_elf_relocate_section) + : Use the `%X%H' rather than `%C' format + for message. Continue processing rather than returning failure. + 2016-05-25 Maciej W. Rozycki - + * elfxx-mips.c (_bfd_mips_elf_relocate_section) : Call `->einfo' rather than `->warning'. Call `bfd_set_error'. diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index c695278e52e..3e7b48845be 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -10267,9 +10267,8 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, 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. */ diff --git a/ld/ChangeLog b/ld/ChangeLog index 9812e7cb46b..4462450b9b6 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,45 @@ +2016-05-26 Maciej W. Rozycki + + * 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. + 2016-05-26 Nick Clifton PR target/20134 diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp index ceb588d44fe..f9bbcec5dcc 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf.exp @@ -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. diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-0.d b/ld/testsuite/ld-mips-elf/unaligned-jalx-0.d index 571a293efc9..a37e5a914f7 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-jalx-0.d +++ b/ld/testsuite/ld-mips-elf/unaligned-jalx-0.d @@ -9,6 +9,8 @@ Disassembly of section \.text: [0-9a-f]+ <[^>]*> 77000008 jalx 1c000020 +[0-9a-f]+ <[^>]*> 00000000 nop +[0-9a-f]+ <[^>]*> 77000009 jalx 1c000024 [0-9a-f]+ <[^>]*> 00000000 nop \.\.\. \.\.\. diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-0.s b/ld/testsuite/ld-mips-elf/unaligned-jalx-0.s index 11e874a28a8..46e542dc104 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-jalx-0.s +++ b/ld/testsuite/ld-mips-elf/unaligned-jalx-0.s @@ -4,6 +4,7 @@ .ent foo foo: jal bar0 + jal bar2 .end foo # Force some (non-delay-slot) zero bytes, to make 'objdump' print ... diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-1.d b/ld/testsuite/ld-mips-elf/unaligned-jalx-1.d index 9cbf6540da1..650bd8f8c43 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-jalx-1.d +++ b/ld/testsuite/ld-mips-elf/unaligned-jalx-1.d @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-2.d b/ld/testsuite/ld-mips-elf/unaligned-jalx-2.d deleted file mode 100644 index c401cfe0a59..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-jalx-2.d +++ /dev/null @@ -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 -[0-9a-f]+ <[^>]*> 00000000 nop - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-2.s b/ld/testsuite/ld-mips-elf/unaligned-jalx-2.s deleted file mode 100644 index 34de1396a75..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-jalx-2.s +++ /dev/null @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d b/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d index 5b3dea1072d..2622103bd7e 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d +++ b/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d @@ -9,6 +9,8 @@ Disassembly of section \.text: [0-9a-f]+ <[^>]*> f300 0008 jalx 1c000020 +[0-9a-f]+ <[^>]*> 0000 0000 nop +[0-9a-f]+ <[^>]*> f300 0009 jalx 1c000024 [0-9a-f]+ <[^>]*> 0000 0000 nop \.\.\. \.\.\. diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d b/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d index a63fa310a7e..2df19df1822 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d +++ b/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-2.d b/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-2.d deleted file mode 100644 index 8c0702323a7..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-2.d +++ /dev/null @@ -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 -[0-9a-f]+ <[^>]*> 0000 0000 nop - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d b/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d index 9609736967d..176680d64c7 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d +++ b/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d @@ -9,6 +9,8 @@ Disassembly of section \.text: [0-9a-f]+ <[^>]*> 1c18 0008 jalx 1c000020 +[0-9a-f]+ <[^>]*> 6500 nop +[0-9a-f]+ <[^>]*> 1c18 0009 jalx 1c000024 [0-9a-f]+ <[^>]*> 6500 nop \.\.\. \.\.\. diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d b/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d index 45188e0e46a..4c3e1bbd0bf 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d +++ b/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-2.d b/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-2.d deleted file mode 100644 index d4066513219..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-2.d +++ /dev/null @@ -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 -[0-9a-f]+ <[^>]*> 6500 nop - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. - \.\.\. diff --git a/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.d b/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.d index 126c1b1f046..84b356c050a 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.d +++ b/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.d @@ -9,4 +9,5 @@ Disassembly of section \.text: [0-9a-f]+ <[^>]*> ec590004 ldpc v0,1c080020 +[0-9a-f]+ <[^>]*> ec590005 ldpc v0,1c080028 \.\.\. diff --git a/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.s b/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.s index c99b4b7b96f..22fcd727be0 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.s +++ b/ld/testsuite/ld-mips-elf/unaligned-ldpc-0.s @@ -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 ... diff --git a/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.d b/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.d index 1213cd0d5c1..ca20d61b383 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.d +++ b/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.d @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.s b/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.s index 4afe84975cd..40b44e3ae5b 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.s +++ b/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.s @@ -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 ... diff --git a/ld/testsuite/ld-mips-elf/unaligned-ldpc-2.d b/ld/testsuite/ld-mips-elf/unaligned-ldpc-2.d deleted file mode 100644 index 6c0176caae4..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-ldpc-2.d +++ /dev/null @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-ldpc-2.s b/ld/testsuite/ld-mips-elf/unaligned-ldpc-2.s deleted file mode 100644 index 11e88f6131d..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-ldpc-2.s +++ /dev/null @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-ldpc-3.d b/ld/testsuite/ld-mips-elf/unaligned-ldpc-3.d deleted file mode 100644 index 7a95d1c9124..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-ldpc-3.d +++ /dev/null @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-ldpc-3.s b/ld/testsuite/ld-mips-elf/unaligned-ldpc-3.s deleted file mode 100644 index dac870f21cb..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-ldpc-3.s +++ /dev/null @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-ldpc-4.d b/ld/testsuite/ld-mips-elf/unaligned-ldpc-4.d deleted file mode 100644 index d5610a7f107..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-ldpc-4.d +++ /dev/null @@ -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 - \.\.\. diff --git a/ld/testsuite/ld-mips-elf/unaligned-ldpc-4.s b/ld/testsuite/ld-mips-elf/unaligned-ldpc-4.s deleted file mode 100644 index 596cccb1e09..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-ldpc-4.s +++ /dev/null @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.d b/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.d index 89c56c8a11b..b7b2946f973 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.d +++ b/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.d @@ -9,4 +9,5 @@ Disassembly of section \.text: [0-9a-f]+ <[^>]*> ec4a0008 lwpc v0,1c080020 +[0-9a-f]+ <[^>]*> ec4a0008 lwpc v0,1c080024 \.\.\. diff --git a/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.s b/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.s index 5d997f52ea6..028969f1be4 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.s +++ b/ld/testsuite/ld-mips-elf/unaligned-lwpc-0.s @@ -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 ... diff --git a/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.d b/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.d index f4cf317422c..39f03c3dc95 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.d +++ b/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.d @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.s b/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.s index 595ebb9bed9..c8d4edfaed7 100644 --- a/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.s +++ b/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.s @@ -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 ... diff --git a/ld/testsuite/ld-mips-elf/unaligned-lwpc-2.d b/ld/testsuite/ld-mips-elf/unaligned-lwpc-2.d deleted file mode 100644 index 287582827c9..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-lwpc-2.d +++ /dev/null @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-lwpc-2.s b/ld/testsuite/ld-mips-elf/unaligned-lwpc-2.s deleted file mode 100644 index 1debe4d164d..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-lwpc-2.s +++ /dev/null @@ -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 diff --git a/ld/testsuite/ld-mips-elf/unaligned-lwpc-3.d b/ld/testsuite/ld-mips-elf/unaligned-lwpc-3.d deleted file mode 100644 index bda99c3d348..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-lwpc-3.d +++ /dev/null @@ -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 - \.\.\. diff --git a/ld/testsuite/ld-mips-elf/unaligned-lwpc-3.s b/ld/testsuite/ld-mips-elf/unaligned-lwpc-3.s deleted file mode 100644 index 667d7d987e8..00000000000 --- a/ld/testsuite/ld-mips-elf/unaligned-lwpc-3.s +++ /dev/null @@ -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