This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PR25384, PowerPC64 ELFv1 copy relocs against function symbols
- From: Alan Modra <amodra at gmail dot com>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Thu, 16 Jan 2020 00:15:22 +1030
- Subject: Re: PR25384, PowerPC64 ELFv1 copy relocs against function symbols
- References: <20200115024252.GW4433@bubble.grove.modra.org> <CAEMqeSoGZE54VqHf7sJPN3ciPEQhtSyjWUz8naEo9YD658=a=A@mail.gmail.com>
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