diff options
author | Nick Clifton <nickc@redhat.com> | 2010-04-29 14:44:15 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2010-04-29 14:44:15 +0000 |
commit | 77db8e2e96ba37bb1915261d21f7287f15b67bf8 (patch) | |
tree | 95d5cd9e621e6912a423b1b35b9120b31360df4d /gas/write.c | |
parent | c0643a5132a92140534e5a0de9fd26ca5c5e9060 (diff) | |
download | gdb-77db8e2e96ba37bb1915261d21f7287f15b67bf8.zip gdb-77db8e2e96ba37bb1915261d21f7287f15b67bf8.tar.gz gdb-77db8e2e96ba37bb1915261d21f7287f15b67bf8.tar.bz2 |
* 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 a148b24..b50b0d4 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 |