This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Prelinking of shared libraries
- To: libc-alpha at sources dot redhat dot com
- Subject: Re: Prelinking of shared libraries
- From: Waldo Bastian <bastian at kde dot org>
- Date: Wed, 9 May 2001 14:43:38 -0700
> 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.
>
> Andreas
Yes, that seems the easiest way to do it. Some people pointed out a scheme
where you have a central "link/relocation service" (either in user or kernel
space) which maps the linked library into the address-space of the process.
Geoff Keating told me that AIX uses such an approach. That basically moves
the linking/relocation from installation time to "first used" time. I am not
exactly sure what the benefits of one of these schemes above the other has in
terms of use. Doing the linking/relocation at ldconfig time seems less
complex to me.
Cheers,
Waldo
--
bastian@kde.org | SuSE Labs KDE Developer | bastian@suse.com