This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Old PLT in elf64-alpha via ld --traditional-format?
- To: Todd Vierling <tv at wasabisystems dot com>
- Subject: Re: Old PLT in elf64-alpha via ld --traditional-format?
- From: Richard Henderson <rth at redhat dot com>
- Date: Fri, 9 Feb 2001 10:15:05 -0800
- Cc: binutils at sources dot redhat dot com
- References: <Pine.WNT.4.32.0102091155310.-90187-100000@xpc.int.duh.org>
On Fri, Feb 09, 2001 at 12:00:29PM -0500, Todd Vierling wrote:
> NetBSD uses the old-style three-word PLT entries in its shared objects and
> dynamically linked programs, resulting in a hack to elf64-alpha.c for
> NetBSD/alpha. We will be moving to the new PLT format in later NetBSD
> releases, but in order to keep compatibility in the toolchain (and make
> newer binutils still work on older released NetBSD systems), I wanted to
> come up with a dynamic way to produce the old style PLT at link time.
I assume you have no thread libraries whatsoever then?
I would strongly recommend that you modify your ld.so to detect the
old plt format and disable lazy binding in that case. I do this:
/* If the first instruction of the plt entry is not
"br $28, plt0", we cannot do lazy relocation. */
lazy = (*(unsigned int *)(plt + 32) == 0xc39ffff7);
> Would there be serious objection to making this
> produce binaries from ld which use the old PLT format?
I suppose not _serious_ objection, but I do think it is a mistake.
It should be simple enough to come up with a small errata patch for
older system's ld.so.
r~