This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][GOLD] Fix handling of undefined symbols in relocations.


Hi Ian,

    This patch adds code to exit Target_arm::Relocate::relocate early
if a relocation uses a symbol's value and the symbol is undefined but
not weakly undefined.  We should not do anything in this case and just
let the caller report an undefined symbol error.

-Doug

2010-06-29  Doug Kwan  <dougkwan@google.com>

        * arm-reloc-property.cc (Arm_reloc_property::Arm_reloc_property):
        Initialize USE_SYMBOL_.
        * arm-reloc-property.h (Arm_reloc_property::uses_symbol): New method
        definition.
        (Arm_reloc_property::uses_symbol_): New data member declaration.
        * arm.cc (Target_arm::Relocate::relocate): Exit early if relocation
        uses symbol value and symbol is undefined but not weakly undefined.

Attachment: patch-undefined.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]