Subject: Re: ELF prebinding round 2: shared object prerelocation
To: Charles Hannum <>
From: Bang Jun-Young <>
List: tech-userlevel
Date: 09/22/2002 18:33:49
On Sun, Sep 22, 2002 at 06:17:05AM +0000, Charles Hannum wrote:
> I guess what I mean to say here is: the hack of changing the VMA of a
> shared library and modifying all the base-relative relocations will
> work fine -- you're basically emulating what would happen if your
> linker script set the address differently.  It's already fully
> supported for shared libraries, and (with a recent bug fix to the
> kernel) for ld.elf_so as well.

In the real world, things are not that simple. In order to avoid
overlap between libraries' vmspace, we have to maintain information
on libraries, their base addresses, and map sizes to be passed over
to ld at compile time or used for other purpose, like this:

/usr/lib/ 0x60000000 : 0xcffff
/usr/lib/ 0x600d0000 : 0x1ffff

If got larger for some reason (usual case), this info would
be no longer valid and so, should be regenerarted. Would that be
able to easily done without a tool?

> But, it doesn't really solve the `prebinding' problem.

I agree. Prebinding is not so simple as I expected at first. 


Bang Jun-Young <>