Subject: Re: ELF prebinding round 2: shared object prerelocation
To: Bang Jun-Young <email@example.com>
From: Jason R Thorpe <firstname.lastname@example.org>
Date: 09/21/2002 18:52:54
On Sat, Sep 21, 2002 at 04:21:10PM +0900, Bang Jun-Young wrote:
> A shared object now has preferred base address, which gives a hint
> to ld.elf_so where to load the object. This information must be known
> to ld.elf_so before shared object is actually loaded, so I decided to
> put it in p_paddr of the first PT_LOAD entry. This field has unspecifed
> contents and is ignored, according to SysV ABI spec (in normal case
> p_paddr == p_vaddr).
Hm. This seems like ... not the best way. The problem is that
the preferred address could be very different based on the program
that uses the lib, not the lib itself.
...but, ignoring that part... :-)
I'm not particularly keen on the idea of using the "paddr" in the first
phdr to indicate the preferred address -- seems like it would be better
to insert a new entry into .dynamic which contained the necessary info.
-- Jason R. Thorpe <email@example.com>