This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH/RFA] elf64-alpha: Don't put DT_PLTGOT dynamic if no PLT
On Fri, Jul 19, 2002 at 08:16:59PM +0930, Alan Modra wrote:
> On Thu, Jul 18, 2002 at 01:57:11PM -0700, Jason R Thorpe wrote:
> > The problem occurs when a shared object contains no external references,
> > and thus has no PLT. elf64_alpha_size_dynamic_sections() inserts a
> > DT_PLTGOT entry anyway, which confuses the dynamic linker, resulting in
> > a crash.
>
> So, it's really a NetBSD dynamic linker bug?
It seems more like a BFD bug, to me; it told the dynamic linker there
was a PLT when in fact there was not. How is this not a BFD bug?
A quick random sampling of a few other ELF back-ends shows that they
also do not add DT_PLTGOT if a PLT is not present... alpha was the
odd man out.
> > * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
> > DT_PLTGOT into the dynamic section if there is a PLT.
>
> I'm fairly certain this won't cause any problem with glibc based
> systems, so the patch is OK everywhere. Give Richard Henderson
> a day or two to nak it before committing though. Hey Richard,
> why aren't you listed as binutils alpha maintainer?
Yah, I was hoping (expecting? :-) Richard would confirm this wouldn't be
a problem for Linux systems...
Once I hear an OK from Richard, it might be a couple of days before
I check it in, though, as I'm leaving for a short vacation tomorrow.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>