diff options
author | Nick Clifton <nickc@redhat.com> | 2010-04-29 14:44:13 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2010-04-29 14:44:13 +0000 |
commit | 37a2bdf1f329089af44b505e0cb0f370a73d48df (patch) | |
tree | 55ae56d82eb5069c37ead329610c9b9f3f5ddf3c /gas/write.c | |
parent | da1363537cd2aebab8257c86a661aaa3afb665a4 (diff) | |
download | binutils-redhat-37a2bdf1f329089af44b505e0cb0f370a73d48df.tar.gz |
* 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.c | 4 |
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 |