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: ICF on PowerPC Bug


Committed with those changes.

Thanks
Sri

On Wed, Apr 2, 2014 at 2:12 PM, Cary Coutant <ccoutant@google.com> wrote:
>> Attached patch to fix the PPC ICF problem by using references to the
>> reloc info vectors. Ok to commit?
>
> -      Icf::Sections_reachable_info v =
> +      Icf::Sections_reachable_info &v =
>          (it_reloc_info_list->second).section_info;
>        // Stores the information of the symbol pointed to by the reloc.
> -      Icf::Symbol_info s = (it_reloc_info_list->second).symbol_info;
> +      Icf::Symbol_info &s = (it_reloc_info_list->second).symbol_info;
>        // Stores the addend and the symbol value.
> -      Icf::Addend_info a = (it_reloc_info_list->second).addend_info;
> +      Icf::Addend_info &a = (it_reloc_info_list->second).addend_info;
>        // Stores the offset of the reloc.
> -      Icf::Offset_info o = (it_reloc_info_list->second).offset_info;
> -      Icf::Reloc_addend_size_info reloc_addend_size_info =
> +      Icf::Offset_info &o = (it_reloc_info_list->second).offset_info;
> +      Icf::Reloc_addend_size_info &reloc_addend_size_info =
>          (it_reloc_info_list->second).reloc_addend_size_info;
>        Icf::Sections_reachable_info::iterator it_v = v.begin();
>        Icf::Symbol_info::iterator it_s = s.begin();
>
> Except for v and a, I think these can all be const, and their
> iterators can be const_iterators. OK with those changes.
>
> Thanks!
>
> -cary


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