diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2016-07-19 16:19:19 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2016-07-19 16:22:53 +0100 |
commit | a6ebf6169a1bd14724b9ac49990089542396f576 (patch) | |
tree | 4b6f6a0e2fe8f81127178b480df5c7c9591eb8bd /ld/testsuite/ld-mips-elf/unaligned-jalx-addend-3.d | |
parent | 9d862524f6ae9703fe8e264dd4785756d358570a (diff) | |
download | gdb-a6ebf6169a1bd14724b9ac49990089542396f576.zip gdb-a6ebf6169a1bd14724b9ac49990089542396f576.tar.gz gdb-a6ebf6169a1bd14724b9ac49990089542396f576.tar.bz2 |
MIPS: Convert cross-mode BAL to JALX
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.
Diffstat (limited to 'ld/testsuite/ld-mips-elf/unaligned-jalx-addend-3.d')
-rw-r--r-- | ld/testsuite/ld-mips-elf/unaligned-jalx-addend-3.d | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-3.d b/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-3.d new file mode 100644 index 0000000..1c0551c --- /dev/null +++ b/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-3.d @@ -0,0 +1,29 @@ +#name: MIPS JALX to unaligned symbol with addend 3 +#source: unaligned-jalx-addend-3.s +#source: unaligned-insn.s -mips16 +#as: -EB -n32 -march=from-abi +#ld: -EB -Ttext 0x1c000000 -e 0x1c000000 +#error: \A[^\n]*: In function `foo':\n +#error: \(\.text\+0x0\): Cannot convert a branch to JALX for a non-word-aligned address\n +#error: [^\n]*: In function `foo':\n +#error: \(\.text\+0x8\): Cannot convert a branch to JALX for a non-word-aligned address\n +#error: [^\n]*: In function `foo':\n +#error: \(\.text\+0x10\): Cannot convert a branch to JALX for a non-word-aligned address\n +#error: [^\n]*: In function `foo':\n +#error: \(\.text\+0x18\): Cannot convert a branch to JALX for a non-word-aligned address\n +#error: [^\n]*: In function `foo':\n +#error: \(\.text\+0x20\): Cannot convert a branch to JALX for a non-word-aligned address\n +#error: [^\n]*: In function `foo':\n +#error: \(\.text\+0x28\): Cannot convert a branch to JALX for a non-word-aligned address\n +#error: [^\n]*: In function `foo':\n +#error: \(\.text\+0x30\): Cannot convert a branch to JALX for a non-word-aligned address\n +#error: [^\n]*: In function `foo':\n +#error: \(\.text\+0x38\): Cannot convert a branch to JALX for a non-word-aligned address\n +#error: [^\n]*: In function `foo':\n +#error: \(\.text\+0x40\): Cannot convert a branch to JALX for a non-word-aligned address\n +#error: [^\n]*: In function `foo':\n +#error: \(\.text\+0x48\): Cannot convert a branch to JALX for a non-word-aligned address\n +#error: [^\n]*: In function `foo':\n +#error: \(\.text\+0x50\): Cannot convert a branch to JALX for a non-word-aligned address\n +#error: [^\n]*: In function `foo':\n +#error: \(\.text\+0x58\): Cannot convert a branch to JALX for a non-word-aligned address\Z |