This is the mail archive of the
mailing list for the glibc project.
Re: Prelinking of shared libraries
- To: Andreas Jaeger <aj at suse dot de>
- Subject: Re: Prelinking of shared libraries
- From: Bruno Haible <haible at ilog dot fr>
- Date: Fri, 11 May 2001 16:30:53 +0200 (CEST)
- Cc: libc-alpha at sources dot redhat dot com
- References: <email@example.com>
Andreas Jaeger wrote:
> 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 you constrain yourself to a fixed list of directories (e.g. those
listed in /etc/ld.so.conf), you can probably avoid address space
clashes entirely, since 1.5 GB of address space (on Linux/x86) should be
sufficient for hundreds of libraries.
In a second step, you could partially prelink each library at least
against all libraries that it depends on (via DT_NEEDED).
Note the prelinked information cannot be stored in /usr/lib/, because
that directory needs not be writable according to FHS; you'd need to
store the info in /etc/.