Re: Dynamic library loader search path



Paul,

Thanks a lot for your comprehensive answer !

The capability strings are filled by _dl_important_hwcaps() in
sysdeps/generic/dl-sysdep.c and (AFAICT) you can't modify any of
this without rebuilding glibc.

As I understand dl-sysdeps.c is glibc source file. However it seems
that ld-linux.so links statically with glibc. So I also need to rebuild
ld-linux.so.
Correct ? Where can I get ld-linux.so sources for RHEL 3 ? Is it gnu
application ?

How many directories *are* you searching?

Unless your LD_LIBRARY_PATH contains 1000s of directories (or you
are searching directories on a slow NFS server), I don't see how
searching 4 times as many would "highly increase search time".

Well, may be I was too pessimistic. Lets reword my claim as "increase
search time".
By the way I checked the strace output and found that in case the
directories augmented with "capacity strings" do not exist (this is
almost always the case) they are searched only once and then checked
for existence with stat64() and if they do not exist they are no longer

searched. This is much better situation than I thought.

Regards,

Gregory

.