[PATCH] ELF: Move dyn_relocs to struct elf_link_hash_entry

H.J. Lu hjl.tools@gmail.com
Tue Jun 2 01:16:44 GMT 2020


On Mon, Jun 1, 2020 at 5:55 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Mon, Jun 01, 2020 at 12:20:55PM -0700, H.J. Lu via Binutils wrote:
> > All ELF backends with shared library support have
> >
> >   /* Track dynamic relocs copied for this symbol.  */
> >   struct elf_dyn_relocs *dyn_relocs;
> >
> > in symbol hash entry.  Move dyn_relocs to struct elf_link_hash_entry
> > to reduce code duplication.
> >
> > I will check it in if there are no objections.
>
> I like it.  If targets need to extend struct dyn_relocs they can do
> that easily enough in their target code.  (The new dyn_relocs pointer
> in elf_link_hash_entry could be a void*.)
>

I will check it in and keep dyn_relocs as struct elf_dyn_relocs *.  I will
have followup patches to further remove duplicated code.


-- 
H.J.


More information about the Binutils mailing list