* config/tc-mips.c (md_apply_fix): If we aren't adjusting this

fixup to be against the section symbol, adjust the value
	accordingly.
This commit is contained in:
Ian Lance Taylor 1997-02-03 17:56:00 +00:00
parent 3569064fb5
commit 1748b9d8f0
2 changed files with 25 additions and 0 deletions

View File

@ -1,5 +1,9 @@
Mon Feb 3 12:35:54 1997 Ian Lance Taylor <ian@cygnus.com>
* config/tc-mips.c (md_apply_fix): If we aren't adjusting this
fixup to be against the section symbol, adjust the value
accordingly.
* symbols.c (resolve_symbol_value): Don't change X_add_number for
an equated symbol.
* write.c (write_relocs): Avoid looping on equated symbols.

View File

@ -8217,6 +8217,27 @@ md_apply_fix (fixP, valueP)
|| fixP->fx_r_type == BFD_RELOC_64);
value = *valueP;
/* If we aren't adjusting this fixup to be against the section
symbol, we need to adjust the value. */
#ifdef S_GET_OTHER
if (fixP->fx_addsy != NULL
&& (S_IS_EXTERNAL (fixP->fx_addsy)
|| S_IS_WEAK (fixP->fx_addsy))
&& OUTPUT_FLAVOR == bfd_target_elf_flavour
&& S_GET_OTHER (fixP->fx_addsy) == STO_MIPS16)
{
value -= S_GET_VALUE (fixP->fx_addsy);
if (value != 0 && ! fixP->fx_pcrel)
{
/* In this case, the bfd_install_relocation routine will
incorrectly add the symbol value back in. We just want
the addend to appear in the object file. */
value -= S_GET_VALUE (fixP->fx_addsy);
}
}
#endif
fixP->fx_addnumber = value; /* Remember value for tc_gen_reloc */
if (fixP->fx_addsy == NULL && ! fixP->fx_pcrel)