This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Patch to fix bug in gold ICF.
- From: Ian Lance Taylor <iant at google dot com>
- To: Sriraman Tallam <tmsriram at google dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Fri, 19 Feb 2010 20:50:22 -0800
- Subject: Re: Patch to fix bug in gold ICF.
- References: <863b0cbf1002191930l5fbf3c86i27c55480d97f806c@mail.gmail.com>
Sriraman Tallam <tmsriram@google.com> writes:
> 2010-02-19 Sriraman Tallam <tmsriram@google.com>
>
> * gc.h (gc_process_relocs): Change vectors to point to the new list.
> Add reloc offset information.
> * icf.cc (get_section_contents): Change iterators to point to the new
> vectors. Add reloc offset information to the contents.
> * icf.h (Icf::Sections_reachable_info): New typedef.
> (Icf::Sections_reachable_list): New typedef.
> (Icf::Offset_info): New typedef.
> (Icf::Reloc_info): New struct typedef.
> (Icf::Reloc_info_list): New typedef.
> (Icf::symbol_reloc_list): Delete method.
> (Icf::addend_reloc_list): Delete method.
> (Icf::section_reloc_list): Delete method.
> (Icf::reloc_info_list): New method.
> (Icf::reloc_info_list_): New member.
> + long long reloc_offset = static_cast<long long>(
> + convert_to_section_size_type(reloc.get_r_offset()));
> + (*offsetvec).push_back(reloc_offset);
Don't use "long long". Use either section_size_type (note that you
are already converting to section_size_type) or use
elfcpp::Elf_types<size>::Elf_Addr.
> + long long reloc_offset = static_cast<long long>(
> + convert_to_section_size_type(reloc.get_r_offset()));
> + (*offsetvec).push_back(reloc_offset);
Here too.
> + typedef std::vector<long long> Offset_info;
Here use section_size_type or uint64_t.
This is OK with those changes.
Thanks.
Ian