microMIPS/BFD: Add missing NewABI TLS and miscellaneous relocations
authorMaciej W. Rozycki <macro@mips.com>
Mon, 2 Jul 2018 22:57:22 +0000 (23:57 +0100)
committerMaciej W. Rozycki <macro@mips.com>
Mon, 2 Jul 2018 22:57:22 +0000 (23:57 +0100)
commit156f2c001e22dfeee69c92bdb380d5eb28a3de78
treee4f442c8336bd2b7c84ead22f8a0e045f876e102
parent30e5322741b7cb8fe90bec43ab93eecceaaec0e7
microMIPS/BFD: Add missing NewABI TLS and miscellaneous relocations

Complement commit df58fc944dbc ("MIPS: microMIPS ASE support"),
<https://sourceware.org/ml/binutils/2011-07/msg00198.html>, and add TLS
and a few miscellaneous relocations to NewABI microMIPS support, fixing
GAS assertion failures:

.../gas/testsuite/gas/mips/elf-rel28.s: Assembler messages:
.../gas/testsuite/gas/mips/elf-rel28.s:19: Internal error in append_insn at .../gas/config/tc-mips.c:7660.
Please report this bug.

observed if an attempt is made to assemble the `elf-rel28.s' test case
to microMIPS code.  The relocations are the same as with o32 support,
except for `partial_inplace' and `src_mask' updates for the respective
RELA variants.

bfd/
* elf64-mips.c (micromips_elf64_howto_table_rel): Add
R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
R_MICROMIPS_PC23_S2 relocation entries.
(micromips_elf64_howto_table_rela): Likewise.
(micromips_reloc_map): Likewise.
* elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
(elf_micromips_howto_table_rela): Likewise.
(micromips_reloc_map): Likewise.

gas/
* testsuite/gas/mips/elf-rel28-micromips-n32.d: New test.
* testsuite/gas/mips/elf-rel28-micromips-n64.d: New test.
* testsuite/gas/mips/mips.exp: Run the new tests.
bfd/ChangeLog
bfd/elf64-mips.c
bfd/elfn32-mips.c
gas/ChangeLog
gas/testsuite/gas/mips/elf-rel28-micromips-n32.d [new file with mode: 0644]
gas/testsuite/gas/mips/elf-rel28-micromips-n64.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips.exp
This page took 0.026862 seconds and 4 git commands to generate.