Where does lb.so look
Hi;
Im a linux newb studying the shared libraries and how they work. I was informed that the /etc/ld.so.conf file contained a list of all the directories that the shared library files are looked for. But when I went to the ld.so man page it said othewise:
Contents of the ld.so man page:
=======================================================================
The necessary shared libraries needed by the program are searched for
in the following order
o Using the DT_RPATH dynamic section attribute of the binary if
present and DT_RUNPATH attribute does not exist.
o Using the environment variable LD_LIBRARY_PATH . Except if the
executable is a setuid/setgid binary, in which case it is
ignored.
o Using the DT_RUNPATH dynamic section attribute of the binary if
present.
o From the cache file /etc/ld.so.cache which contains a compiled
list of candidate libraries previously found in the augmented
library path. If, however, the binary was linked with ‐z node‐
flib linker option, libraries in the default library paths are
skipped.
o In the default path /lib, and then /usr/lib. If the binary was
linked with ‐z nodeflib linker option, this step is skipped.
=======================================================================
I am a bit confused, anyone know what actually happens, and why the other is there?
Thanks alot to all in advance;
movitto
|