mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 01:50:48 +00:00
* 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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user