This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [GOLD][PATCH] Handle ARM relocations in safe ICF.
- From: Ian Lance Taylor <iant at google dot com>
- To: Doug Kwan (éæå) <dougkwan at google dot com>
- Cc: binutils <binutils at sourceware dot org>, Sriraman Tallam <tmsriram at google dot com>
- Date: Thu, 24 Jun 2010 15:58:44 -0700
- Subject: Re: [GOLD][PATCH] Handle ARM relocations in safe ICF.
- References: <AANLkTilU2XWdtBlLFAsFKRydc36JisUNvWZDXlFICQlY@mail.gmail.com>
"Doug Kwan (éæå)" <dougkwan@google.com> writes:
> 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.
> + virtual bool
> + section_may_have_icf_unsafe_pointers(const char* section_name) const
> + {
> + return !is_prefix_of(".ARM.exidx", section_name)
> + && !is_prefix_of(".ARM.extab", section_name)
> + && Target::section_may_have_icf_unsafe_pointers(section_name);
> + }
Use parentheses around the whole expression so that emacs does the
right indentation by default.
> + // Whether a section called SECTION_NAME may have function pointers that
> + // make pointed sections not eligible for safe ICF folding.
I don't know what "pointed sections" means here. Please fix.
This is OK with those changes.
Thanks.
Ian