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]

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


"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


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