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]

[GOLD][PATCH] Handle ARM relocations in safe ICF.


Hi,

   This patch adds code to handle relocations in safe ICF so that we
can fold more functions than just constructors and destructor.  I also
added code to exempt construction vtables.

-Doug


010-06-23  Doug Kwan  <dougkwan@google.com>

        * arm.cc (Target_arm::can_check_for_functions_pointers): Return true.
        (Target_arm::section_may_have_icf_unsafe_pointers): New method
        definition.
        (Target_arm::Scan::local_reloc_may_be_function_pointer,
        Target_arm::Scan::global_reloc_may_be_function_pointer): Implement
        target hook to detect function points.
        (Target_arm::Scan::possible_function_pointer_reloc): New method.
        * icf.h (Icf::check_section_for_function_pointers): Change type of
        parameter SECTION_NAME to const reference to std::string.  Use
        target hook to determine if section may have unsafe pointers.
        * target.h (Target::section_may_have_icf_unsafe_pointers): New
        method definition.

Attachment: patch-arm-icf.txt
Description: Text document


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