summaryrefslogtreecommitdiffstats
path: root/gas/write.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-04-29 14:44:15 +0000
committerNick Clifton <nickc@redhat.com>2010-04-29 14:44:15 +0000
commit77db8e2e96ba37bb1915261d21f7287f15b67bf8 (patch)
tree95d5cd9e621e6912a423b1b35b9120b31360df4d /gas/write.c
parentc0643a5132a92140534e5a0de9fd26ca5c5e9060 (diff)
downloadppe42-binutils-77db8e2e96ba37bb1915261d21f7287f15b67bf8.tar.gz
ppe42-binutils-77db8e2e96ba37bb1915261d21f7287f15b67bf8.zip
* write.c (fixup_segment): Do not assume we know the section a
defined weak symbol is in. * config/tc-arm.c (relax_adr, relax_branch, md_apply_fix): Treat weak symbols as not known to be in the same section, even if they are defined. * gas/arm/weakdef-1.s: New. * gas/arm/weakdef-1.d: New. * gas/arm/weakdef-2.s: New. * gas/arm/weakdef-2.d: New. * gas/arm/weakdef-2.l: New.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gas/write.c b/gas/write.c
index a148b248d2..b50b0d491e 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -992,7 +992,9 @@ fixup_segment (fixS *fixP, segT this_segment)
if (fixP->fx_addsy)
{
- if (add_symbol_segment == this_segment
+ if (S_IS_WEAK (fixP->fx_addsy))
+ ; // even if it is defined, it might be overridden later
+ else if (add_symbol_segment == this_segment
&& !TC_FORCE_RELOCATION_LOCAL (fixP))
{
/* This fixup was made when the symbol's segment was
OpenPOWER on IntegriCloud