aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mips.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r--gas/config/tc-mips.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index abe4630..788a34b 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -13498,11 +13498,6 @@ md_estimate_size_before_relax (fragS *fragp, asection *segtype)
int
mips_fix_adjustable (fixS *fixp)
{
- /* Don't adjust MIPS16 jump relocations, so we don't have to worry
- about the format of the offset in the .o file. */
- if (fixp->fx_r_type == BFD_RELOC_MIPS16_JMP)
- return 0;
-
if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 0;
@@ -13578,6 +13573,10 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
else
reloc->addend = fixp->fx_addnumber;
+ /* Handle relocs adjusted against a section symbol. */
+ if (fixp->fx_r_type == BFD_RELOC_MIPS16_JMP)
+ reloc->addend += fixp->fx_offset;
+
/* Since the old MIPS ELF ABI uses Rel instead of Rela, encode the vtable
entry to be used in the relocation's section offset. */
if (! HAVE_NEWABI && fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)