mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
a6ebf6169a
Convert cross-mode regular MIPS and microMIPS BAL instructions to JALX, similarly to how JAL instructions are converted. bfd/ * elfxx-mips.c (mips_elf_perform_relocation): Convert cross-mode BAL to JALX. (_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Add a corresponding error message. gas/ * config/tc-mips.c (mips_force_relocation, mips_fix_adjustable): Adjust comments for BAL to JALX linker conversion. (fix_bad_cross_mode_branch_p): Accept cross-mode BAL. * testsuite/gas/mips/unaligned-branch-1.l: Update error messages expected. * testsuite/gas/mips/unaligned-branch-micromips-1.l: Likewise. * testsuite/gas/mips/branch-local-4.d: New test. * testsuite/gas/mips/branch-local-n32-4.d: New test. * testsuite/gas/mips/branch-local-n64-4.d: New test. * testsuite/gas/mips/branch-addend.d: New test. * testsuite/gas/mips/branch-addend-n32.d: New test. * testsuite/gas/mips/branch-addend-n64.d: New test. * testsuite/gas/mips/branch-local-4.s: New test source. * testsuite/gas/mips/branch-addend.s: New test source. * testsuite/gas/mips/mips.exp: Run the new tests. ld/ * testsuite/ld-mips-elf/unaligned-branch-2.d: Update error messages expected. * testsuite/ld-mips-elf/unaligned-branch-r6-1.d: Likewise. * testsuite/ld-mips-elf/unaligned-branch-mips16.d: Likewise. * testsuite/ld-mips-elf/unaligned-branch-micromips.d: Likewise. * testsuite/ld-mips-elf/bal-jalx-addend.d: New test. * testsuite/ld-mips-elf/bal-jalx-local.d: New test. * testsuite/ld-mips-elf/bal-jalx-pic.d: New test. * testsuite/ld-mips-elf/bal-jalx-addend-n32.d: New test. * testsuite/ld-mips-elf/bal-jalx-local-n32.d: New test. * testsuite/ld-mips-elf/bal-jalx-pic-n32.d: New test. * testsuite/ld-mips-elf/bal-jalx-addend-n64.d: New test. * testsuite/ld-mips-elf/bal-jalx-local-n64.d: New test. * testsuite/ld-mips-elf/bal-jalx-pic-n64.d: New test. * testsuite/ld-mips-elf/unaligned-jalx-2.d: New test. * testsuite/ld-mips-elf/unaligned-jalx-3.d: New test. * testsuite/ld-mips-elf/unaligned-jalx-addend-2.d: New test. * testsuite/ld-mips-elf/unaligned-jalx-addend-3.d: New test. * testsuite/ld-mips-elf/unaligned-jalx-2.s: New test source. * testsuite/ld-mips-elf/unaligned-jalx-3.s: New test source. * testsuite/ld-mips-elf/unaligned-jalx-addend-2.s: New test source. * testsuite/ld-mips-elf/unaligned-jalx-addend-3.s: New test source. * testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
157 lines
9.0 KiB
Makefile
157 lines
9.0 KiB
Makefile
#name: microMIPS link branch to unaligned symbol
|
|
#as: -EB -n32 -march=from-abi
|
|
#ld: -EB -Ttext 0x1c000000 -e 0x1c000000
|
|
#source: ../../../gas/testsuite/gas/mips/unaligned-branch-micromips-2.s
|
|
#error: \A[^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x100a\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1012\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x101a\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x102a\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1032\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x103a\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1062\): Branch to a non-instruction-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1072\): Branch to a non-instruction-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1082\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1088\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1088\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x108e\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x108e\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1094\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1094\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x109a\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10a0\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10a0\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10a6\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10a6\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10ac\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10ac\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10b2\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10ca\): Branch to a non-instruction-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10d6\): Branch to a non-instruction-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10e2\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10e8\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10e8\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10ee\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10ee\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10f4\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10f4\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x10fa\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1100\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1100\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1106\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1106\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x110c\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x110c\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1112\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x112a\): Branch to a non-instruction-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1136\): Branch to a non-instruction-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1142\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1146\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1146\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x114a\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x114a\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x114e\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x114e\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1152\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1156\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1156\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x115a\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x115a\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x115e\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x115e\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1162\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1172\): Branch to a non-instruction-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x117a\): Branch to a non-instruction-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1182\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1186\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1186\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x118a\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x118a\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x118e\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x118e\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1192\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1196\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x1196\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x119a\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x119a\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x119e\): Cannot convert a branch to JALX for a non-word-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x119e\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x11a2\): Unsupported branch between ISA modes\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x11b2\): Branch to a non-instruction-aligned address\n
|
|
#error: [^\n]*: In function `foo':\n
|
|
#error: \(\.text\+0x11ba\): Branch to a non-instruction-aligned address\Z
|