diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2016-06-21 21:22:39 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2016-06-21 23:00:20 +0100 |
commit | 41947d9e38c4fd27b17843f328d58138193e4f19 (patch) | |
tree | ab440ef62ed51a22e1f7c1fd4214585e69afd8b9 /binutils/readelf.c | |
parent | 717ba204e06d88ed68441e236da3688a92cf054c (diff) | |
download | gdb-41947d9e38c4fd27b17843f328d58138193e4f19.zip gdb-41947d9e38c4fd27b17843f328d58138193e4f19.tar.gz gdb-41947d9e38c4fd27b17843f328d58138193e4f19.tar.bz2 |
MIPS/GAS: Handle resolved R6 PC-relative relocations
Complement commit 7361da2c952e ("Add support for MIPS R6.") and fix
internal errors like:
foo.s: Assembler messages:
foo.s: Internal error!
Assertion failure in md_apply_fix at .../gas/config/tc-mips.c:15028.
Please report this bug.
triggered by resolved R6 PC-relative relocations in sources containing
R6 code fragments wrapped into ISA override blocks embedded within code
otherwise assembled for an older ISA.
gas/
* config/tc-mips.c (calculate_reloc) <BFD_RELOC_HI16_S_PCREL>
<BFD_RELOC_LO16_PCREL>: New switch cases.
(md_apply_fix) <BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL>:
Move switch cases along `BFD_RELOC_MIPS_JMP'.
<BFD_RELOC_MIPS_21_PCREL_S2, BFD_RELOC_MIPS_26_PCREL_S2>
<BFD_RELOC_MIPS_18_PCREL_S3, BFD_RELOC_MIPS_19_PCREL_S2>: Handle
the resolved case.
* testsuite/gas/mips/pcrel-reloc-4.d: New test.
* testsuite/gas/mips/pcrel-reloc-4-r6.d: New test.
* testsuite/gas/mips/pcrel-reloc-5.d: New test.
* testsuite/gas/mips/pcrel-reloc-5-r6.d: New test.
* testsuite/gas/mips/pcrel-reloc-6.d: New test.
* testsuite/gas/mips/pcrel-reloc-6.l: New list test.
* testsuite/gas/mips/pcrel-reloc-4.s: New test source.
* testsuite/gas/mips/pcrel-reloc-6.s: New test source.
* testsuite/gas/mips/mips.exp: Run the new tests.
Diffstat (limited to 'binutils/readelf.c')
0 files changed, 0 insertions, 0 deletions