diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2017-08-30 16:03:31 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2017-08-30 16:07:45 +0100 |
commit | 70e65ca8e5d1fc984d58f6137c290e807fe772a5 (patch) | |
tree | 0943c3adf717058f551e0ef7fd3d1319da584b59 /ld/testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n32.d | |
parent | 37b2d327512baf2f39020e44958fd1f11db46a91 (diff) | |
download | gdb-70e65ca8e5d1fc984d58f6137c290e807fe772a5.zip gdb-70e65ca8e5d1fc984d58f6137c290e807fe772a5.tar.gz gdb-70e65ca8e5d1fc984d58f6137c290e807fe772a5.tar.bz2 |
MIPS/BFD: Correct microMIPS cross-mode BAL to JALX relaxation
Fix a bug in commit a6ebf6169a1b ("MIPS: Convert cross-mode BAL to
JALX") and in BFD linker relaxation correct the microMIPS interpretation
of the branch offset, which is supposed to be shifted by 1 bit, rather
than 2 as in the regular MIPS case.
bfd/
* elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
branch offset interpretation.
gas/
* testsuite/gas/mips/branch-addend-micromips.d: New test.
* testsuite/gas/mips/branch-addend-micromips-n32.d: New test.
* testsuite/gas/mips/branch-addend-micromips-n64.d: New test.
* testsuite/gas/mips/branch-addend-micromips.s: New test source.
* testsuite/gas/mips/mips.exp: Run the new tests.
ld/
* testsuite/ld-mips-elf/bal-jalx-addend-micromips.d: New test.
* testsuite/ld-mips-elf/bal-jalx-addend-micromips-n32.d: New
test.
* testsuite/ld-mips-elf/bal-jalx-addend-micromips-n64.d: New
test.
* testsuite/ld-mips-elf/bal-jalx-local-micromips.d: New test.
* testsuite/ld-mips-elf/bal-jalx-local-micromips-n32.d: New
test.
* testsuite/ld-mips-elf/bal-jalx-local-micromips-n64.d: New
test.
* testsuite/ld-mips-elf/bal-jalx-pic-micromips.d: New test.
* testsuite/ld-mips-elf/bal-jalx-pic-micromips-n32.d: New test.
* testsuite/ld-mips-elf/bal-jalx-pic-micromips-n64.d: New test.
* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips.d: New
test.
* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n32.d: New
test.
* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n64.d: New
test.
* testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
Diffstat (limited to 'ld/testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n32.d')
-rw-r--r-- | ld/testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n32.d | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n32.d b/ld/testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n32.d new file mode 100644 index 0000000..9a293c5 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n32.d @@ -0,0 +1,6 @@ +#name: microMIPS BAL/JALX in PIC mode (ignore branch ISA, n32) +#source: ../../../gas/testsuite/gas/mips/branch-addend-micromips.s +#as: -EB -n32 -march=from-abi +#ld: -EB -Ttext 0x1c000000 -e 0x1c000000 -shared --ignore-branch-isa +#objdump: -dr --prefix-addresses --show-raw-insn +#dump: bal-jalx-pic-ignore-micromips.d |