Subject: re: patch to allow /etc/ld.so.conf configure directories for ELF
To: Jason Thorpe <firstname.lastname@example.org>
From: matthew green <email@example.com>
Date: 03/12/1999 17:53:10
If you move a shared library, and want your programs to continue working,
USE A BLOODY SYMLINK. But don't break an otherwise working system just
to make your life easier.
this does not work in all cases.
actual real scenario:
i do not want shared libraries "visible" to the user. eg, they do not
reside in /usr/lib and thus new programs are not linked with them. so
i hide them elsewhere and use ld.so.conf to let existing dynamically
linked programs continue to work. a symlink would not work.
as greg stated, your posted scenario fails with the presence of
LD_LIBRARY_PATH. are you going to take that out too? i mean, it's
really just a local version of ld.so.conf -- semantically speaking.
why you call ld.so.conf a "lame hack".
to answer charles' post:
some people don't like the idea of a cache at all. i don't really
care either way (though i think it is really needed for a.out where
you have to search each directory for a number of files, rather
than just seeing if "libfoo.so.N" is there.) however, the whole
point of the cache is so that you only need to 1 + N files to map
in N shared libraries at exec time. multiple cache files will
result in more file opens which seems to be to partially defeat the
effect of a cache.
linux and freebsd both apparently retain ldconfig and the cache
functionality for ELF. i personally don't think it is very useful
for ELF, but it would be interesting to see some performance figures
if someone actually implemented it.