This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Old PLT in elf64-alpha via ld --traditional-format?


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]