This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][gold] Mips: Add support for resolving multiple consecutive relocations
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Vladimir Radosavljevic <Vladimir dot Radosavljevic at imgtec dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, Petar Jovanovic <Petar dot Jovanovic at imgtec dot com>
- Date: Wed, 15 Mar 2017 16:40:52 -0700
- Subject: Re: [PATCH][gold] Mips: Add support for resolving multiple consecutive relocations
- Authentication-results: sourceware.org; auth=none
- References: <3060420525346945A0ADBD567348A917EF93C671@BADAG02.ba.imgtec.org> <CAJimCsFe54TGu62k=-tRWqSWt54ruEjw_Bu5g+QQPUH8Z4wPQA@mail.gmail.com>
> Rather than make all these changes to add a parameter to
> Relocate::relocate, the reloc_count can be recomputed from what's in
> relinfo:
>
> size_t reloc_count = (relinfo->shdr.get_sh_size()
> / relinfo->shdr.get_sh_entsize());
>
Sorry, that should be:
elfcpp::Shdr<size, big_endian> shdr(relinfo->reloc_shdr);
size_t reloc_count = shdr.get_sh_size() / shdr.get_sh_entsize();
-cary