[PATCH] ELF: Move dyn_relocs to struct elf_link_hash_entry

Alan Modra amodra@gmail.com
Tue Jun 2 01:38:55 GMT 2020


On Mon, Jun 01, 2020 at 06:16:44PM -0700, H.J. Lu wrote:
> 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 *.

Yes, I wasn't suggesting you should change to a void*, just that it is
possible.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list