From 1fc5d88e4ba59db7a934cb63503a78a8655c9e53 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 4 May 2010 16:21:07 +0000 Subject: [PATCH] * write.c (fixup_segment): Revert previous delta. * config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL): Also force the generation of relocations for fixups against weak symbols. --- gas/ChangeLog | 6 ++++++ gas/config/tc-arm.h | 1 + gas/write.c | 4 +--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index c2b3faab865..d8bfcd0478f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2010-05-04 Nick Clifton + + * write.c (fixup_segment): Revert previous delta. + * config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL): Also force the + generation of relocations for fixups against weak symbols. + 2010-04-29 Nathan Sidwell * write.c (fixup_segment): Do not assume we know the section a diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index dacb342c69d..702e4053b02 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -183,6 +183,7 @@ void arm_copy_symbol_attributes (symbolS *, symbolS *); (!(FIX)->fx_pcrel \ || (FIX)->fx_r_type == BFD_RELOC_ARM_GOT32 \ || (FIX)->fx_r_type == BFD_RELOC_32 \ + || ((FIX)->fx_addsy != NULL && S_IS_WEAK ((FIX)->fx_addsy)) \ || TC_FORCE_RELOCATION (FIX)) /* Force output of R_ARM_REL32 relocations against thumb function symbols. diff --git a/gas/write.c b/gas/write.c index b50b0d491e6..a148b248d20 100644 --- a/gas/write.c +++ b/gas/write.c @@ -992,9 +992,7 @@ fixup_segment (fixS *fixP, segT this_segment) if (fixP->fx_addsy) { - if (S_IS_WEAK (fixP->fx_addsy)) - ; // even if it is defined, it might be overridden later - else if (add_symbol_segment == this_segment + if (add_symbol_segment == this_segment && !TC_FORCE_RELOCATION_LOCAL (fixP)) { /* This fixup was made when the symbol's segment was -- 2.30.2