PR25384, PowerPC64 ELFv1 copy relocs against function symbols

Alan Modra amodra@gmail.com
Wed Jan 15 13:45:00 GMT 2020


On Wed, Jan 15, 2020 at 08:17:41AM -0500, Carlos O'Donell wrote:
> On Tue, Jan 14, 2020 at 9:49 PM Alan Modra <amodra@gmail.com> wrote:
> > +      /* .dynbss copies of function symbols only work if we have
> > +        ELFv1 dot-symbols.  ELFv1 compilers since 2004 default to not
> > +        use dot-symbols and set the function symbol size to the text
> > +        size of the function rather than the size of the descriptor.
> > +        That's wrong for copying a descriptor.  */
> > +      if (((struct ppc_link_hash_entry *) h)->oh == NULL
> > +         || !(h->size == 24 || h->size == 16))
> > +       return TRUE;
> 
> OK. Though I wonder if we can't have a text size that's 24-bytes ;-)

You can, but this is belt and braces.  The dot-symbol test h->oh ought
to be sufficient by itself to exclude ELFv2 and newer ELFv1 code.  I'm
just making really sure my pants don't fall off.  :-)

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list