This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ICF on PowerPC Bug
- From: Cary Coutant <ccoutant at google dot com>
- To: Sriraman Tallam <tmsriram at google dot com>
- Cc: binutils <binutils at sourceware dot org>, Ian Lance Taylor <iant at google dot com>
- Date: Wed, 2 Apr 2014 14:12:31 -0700
- Subject: Re: ICF on PowerPC Bug
- Authentication-results: sourceware.org; auth=none
- References: <CAAs8Hmwt-YWeOGNjOoBhLEbCnRMFsyDnpHYTJtYvioYCM3_b1Q at mail dot gmail dot com> <20140402065443 dot GA18201 at bubble dot grove dot modra dot org> <CAAs8HmwENDhLBNimGSmqW1ApRnZ1Ugpp8KRYDwgyw0=BFtOW9w at mail dot gmail dot com> <CAAs8Hmyd6rJXb6s8my2F1B5=csRdyHw5rAJRKLG4GdApj9AEjw at mail dot gmail dot com>
> 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