MIPS/GAS: Keep the original microMIPS symbol reference in branch relocs
authorMaciej W. Rozycki <macro@imgtec.com>
Thu, 23 Jun 2016 10:33:52 +0000 (11:33 +0100)
committerMaciej W. Rozycki <macro@imgtec.com>
Thu, 23 Jun 2016 11:23:32 +0000 (12:23 +0100)
commit0e9c5a5c9916efc8a6c518c84ffdd50a745482c3
tree60629aadae0f14cf7cbacb6b168d33cad0737bd4
parentce440d638d271d76cc491bd22dc34f6a5760140e
MIPS/GAS: Keep the original microMIPS symbol reference in branch relocs

Keep original microMIPS symbols in references from branch relocations so
that the ISA bit is retained and can be verified for validity in static
link.  No need to update WRT MIPS16 symbols because we keep them all
anyway for other reasons.

gas/
* config/tc-mips.c (b_reloc_p): New function.
(mips_fix_adjustable): Also keep the original microMIPS symbol
referred from branch relocations.
* testsuite/gas/mips/branch-local-1.d: New test.
* testsuite/gas/mips/branch-local-n32-1.d: New test.
* testsuite/gas/mips/branch-local-n64-1.d: New test.
* testsuite/gas/mips/micromips@branch-misc-4-64.d: Update
relocations.
* testsuite/gas/mips/branch-local-1.s: New test source.
* testsuite/gas/mips/mips.exp: Run the new cases.
gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/gas/mips/branch-local-1.d [new file with mode: 0644]
gas/testsuite/gas/mips/branch-local-1.s [new file with mode: 0644]
gas/testsuite/gas/mips/branch-local-n32-1.d [new file with mode: 0644]
gas/testsuite/gas/mips/branch-local-n64-1.d [new file with mode: 0644]
gas/testsuite/gas/mips/micromips@branch-misc-4-64.d
gas/testsuite/gas/mips/mips.exp