This is the mail archive of the
mailing list for the glibc project.
Re: Prelinking of shared libraries
Jakub Jelinek <email@example.com> writes:
> On Sat, May 05, 2001 at 12:22:27AM +0100, Joseph S. Myers wrote:
> > On Sat, 5 May 2001, Martin v. Loewis wrote:
> > > understand pre-linking, you'ld try to assign non-overlapping address
> > > spaces for the most common DSOs.
> > Would this then require a registry (such as LANANA) for the address spaces
> > chosen for prelinking?
> No, the prelinking and address assignation could be done as part of say
> ldconfig, recording the non-overlapping addresses in there. It could try to
> keep the already assigned addresses as much as possible.
> Having a registry would throw us in the a.out DSO days...
Exactly. The idea is that the one configuration program (let's say
ldconfig) loads all libraries into its address space, prelinks them
and saves the prelinked files together with information where they
should be mmapped. The dynamic linker then reads this information and
tries to mmap the prelinked libs into the same address as the
configuration program. If the mmap fails, the lib will be loaded as
if it was not prelinked and relocated normally.
SuSE Labs firstname.lastname@example.org