This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: HPPA ELF DT_PLTGOT handling
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: skrll at netbsd dot org (Nick Hudson)
- Cc: binutils at sources dot redhat dot com, carlos at baldric dot uwo dot ca
- Date: Thu, 8 Jul 2004 12:57:04 -0400 (EDT)
- Subject: Re: HPPA ELF DT_PLTGOT handling
> On Wednesday 07 July 2004 21:49, John David Anglin wrote:
> > > A much more convenient (from the POV of the dynamic linker) is to always
> > > set DT_PLTGOT to a pointer to the GOT. glibc goes searching for the GOT
> > > which it would no longer need to do. Is this worth considering?
> >
> > No. It would change the ABI and break existing code.
>
> Setting the DT_PLTGOT and GP to a pointer to the GOT wouldn't break the ABI. I
> guess the point is that the binutils linker and HP linkers would do different
> things, though.
It wouldn't break the HPPA ELF specification but the issue is that the
dynamic linker would still have to support the old search technique to
handle the case where the GOT location and GP differ. I think a new
EM number would be needed to flag this change so the linker could tell
that DT_PLTGOT now provides the location of the GOT and GP value.
HP obviously isn't going to change the ELF specification as clearly
they intended to provide support for ADDIL removal. Instead of
changing DT_PLTGOT, it would be better to provide a DT_GOT dynamic
tag in the OS range to provide the location of the GOT. This could
be done without impacting existing applications. Presumably, HP
could reserve a number for this purpose.
If you think that this change would help the dynamic loader, I suggest
you discuss the issue with Carlos O'Donell <carlos@baldric.uwo.ca>,
as he is doing most of the HPPA glibc maintenance.
> If nothing else the comment against DT_PLTGOT should changed.
The patch is ok with the addition of a ChangeLog.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)