This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed] MIPS/GAS: Remove erroneous ELF relocation references
- From: "Maciej W. Rozycki" <macro at imgtec dot com>
- To: <binutils at sourceware dot org>
- Date: Wed, 20 Jul 2016 12:55:07 +0100
- Subject: [committed] MIPS/GAS: Remove erroneous ELF relocation references
- Authentication-results: sourceware.org; auth=none
Remove R_MIPS_PC26_S2 and R_MIPS_PC21_S2 relocation references that went
into `mips_force_relocation' with commit 9d862524f6ae ("MIPS: Verify the
ISA mode and alignment of branch and jump targets") by mistake. Their
BFD_RELOC_MIPS_26_PCREL_S2 and BFD_RELOC_MIPS_21_PCREL_S2 equivalents
are already handled there.
gas/
* config/tc-mips.c (mips_force_relocation): Remove
R_MIPS_PC26_S2 and R_MIPS_PC21_S2.
---
binutils-mips-cross-mode-fix.diff
Index: binutils/gas/config/tc-mips.c
===================================================================
--- binutils.orig/gas/config/tc-mips.c 2016-07-20 03:36:03.000000000 +0100
+++ binutils/gas/config/tc-mips.c 2016-07-20 03:41:47.721046851 +0100
@@ -14800,13 +14800,11 @@ mips_force_relocation (fixS *fixp)
|| fixp->fx_r_type == BFD_RELOC_MICROMIPS_16_PCREL_S1)
return 1;
- /* We want to keep R_MIPS_PC26_S2, R_MIPS_PC21_S2, BFD_RELOC_16_PCREL_S2
- BFD_RELOC_MIPS_21_PCREL_S2 and BFD_RELOC_MIPS_26_PCREL_S2 relocations
- against MIPS16 and microMIPS symbols so that we do cross-mode branch
- diagnostics and BAL to JALX conversion by the linker. */
- if ((fixp->fx_r_type == R_MIPS_PC26_S2
- || fixp->fx_r_type == R_MIPS_PC21_S2
- || fixp->fx_r_type == BFD_RELOC_16_PCREL_S2
+ /* We want to keep BFD_RELOC_16_PCREL_S2 BFD_RELOC_MIPS_21_PCREL_S2
+ and BFD_RELOC_MIPS_26_PCREL_S2 relocations against MIPS16 and
+ microMIPS symbols so that we can do cross-mode branch diagnostics
+ and BAL to JALX conversion by the linker. */
+ if ((fixp->fx_r_type == BFD_RELOC_16_PCREL_S2
|| fixp->fx_r_type == BFD_RELOC_MIPS_21_PCREL_S2
|| fixp->fx_r_type == BFD_RELOC_MIPS_26_PCREL_S2)
&& fixp->fx_addsy