This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Prelinking of shared libraries


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/.

Bruno


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]