From 46bac6de1815656ee140143b2347d7bbdd1f151e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 25 Jul 2001 22:27:46 +0000 Subject: [PATCH] 2001-07-25 H.J. Lu * 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. --- gas/ChangeLog | 7 +++++++ gas/config/tc-mips.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 1982bb5f927..456a6dc95b0 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2001-07-25 H.J. Lu + + * 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 * config/tc-mips.c: Fix spelling error in comment. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 29090c2b9be..b6b9c7dad50 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -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) -- 2.30.2