2001-07-25 H.J. Lu <hjl@gnu.org>

* config/tc-mips.c (md_estimate_size_before_relax): Make sure
	we treat weak like extern only for ELF.
	(mips_fix_adjustable): Make sure we don't adjust extern/weak
	symbols only for ELF.
This commit is contained in:
H.J. Lu 2001-07-25 22:27:46 +00:00
parent 2f4dcb115b
commit 46bac6de18
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2001-07-25 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (md_estimate_size_before_relax): Make sure
we treat weak like extern only for ELF.
(mips_fix_adjustable): Make sure we don't adjust extern/weak
symbols only for ELF.
2001-07-25 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c: Fix spelling error in comment.

View file

@ -11123,7 +11123,8 @@ md_estimate_size_before_relax (fragp, segtype)
&& !linkonce
#ifdef OBJ_ELF
/* A global or weak symbol is treated as external. */
&& ! (S_IS_EXTERN (sym) || S_IS_WEAK (sym))
&& (OUTPUT_FLAVOR == bfd_target_elf_flavour
&& ! (S_IS_EXTERN (sym) || S_IS_WEAK (sym)))
#endif
);
}
@ -11163,7 +11164,8 @@ mips_fix_adjustable (fixp)
{
#ifdef OBJ_ELF
/* Prevent all adjustments to global symbols. */
if (S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy))
if (OUTPUT_FLAVOR == bfd_target_elf_flavour
&& (S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy)))
return 0;
#endif
if (fixp->fx_r_type == BFD_RELOC_MIPS16_JMP)