ld.so/ld-linux.so - dynamic linker/loader
ld.so loads the shared libraries needed by a program, prepares the pro
gram to run, and then runs it. Unless explicitly specified via the
-static option to ld during compilation, all Linux programs are incom
plete and require further linking at run time.
The necessary shared libraries needed by the program are searched for
in the following order
o Using the environment variable LD_LIBRARY_PATH
(LD_AOUT_LIBRARY_PATH for a.out programs). Except if the exe
cutable is a setuid/setgid binary, in which case it is ignored.
o From the cache file /etc/ld.so.cache which contains a compiled
list of candidate libraries previously found in the augmented
o In the default path /usr/lib, and then /lib.
COMMAND LINE OPTIONS
--list List all dependencies and how they are resolved.
Verify that program is dynamically linked and this dynamic
linker can handle it.
Override LD_LIBRARY_PATH environment variable setting (see
Ignore RPATH and RUNPATH information in object names in LIST.
This option has been supported by glibc2 for about one hour.
Then it was renamed into:
A colon-separated list of directories in which to search for ELF
libraries at execution-time. Similar to the PATH environment
A whitespace-separated list of additional, user-specified, ELF
shared libraries to be loaded before all others. This can be
used to selectively override functions in other shared
libraries. For setuid/setgid ELF binaries, only libraries in
the standard search directories that are also setgid will be
If present, causes the program to list its dynamic library
dependencies, as if run by ldd, instead of running normally.
If present, causes the dynamic linker to resolve all symbols at
program startup instead of when they are first referenced.
A colon-separated list of directories in which to search for
a.out libraries at execution-time. Similar to the PATH environ
The name of an additional, user-specified, a.out shared library
to be loaded after all others. This can be used to selectively
override functions in other shared libraries.
Suppress warnings about a.out libraries with incompatible minor
If set to non-empty string, warn about unresolved symbols.
Dont ignore the directory in the names of a.out libraries to be
loaded. Use of this option is strongly discouraged.
Output verbose debugging information about the dynamic linker.
If set to all prints all debugging information it has, if set to
help prints a help message about which categories can be speci
fied in this environment variable.
File where LD_DEBUG output should be fed into, default is stan
dard output. LD_DEBUG_OUTPUT is ignored for setuid/setgid bina
If set to non-empty string, output symbol versioning information
about the program if querying information about the program (ie.
either LD_TRACE_LOADED_OBJECTS has been set, or --list or --ver
ify options have been given to the dynamic linker).
Every DSO (Dynamic Shared Object, aka shared library) can tell
the dynamic linker in glibc which minimum OS ABI version is
needed. The information about the minimum OS ABI version is
encoded in a ELF note section usually named .note.ABI-tag. This
is used to determine which library to load when multiple version
of the same library is installed on the system.
The LD_ASSUME_KERNEL environment variable overrides the kernel
version used by the dynamic linker to determine which library to
/lib/ld.so a.out dynamic linker/loader
/lib/ld-linux.so.* ELF dynamic linker/loader
/etc/ld.so.cache File containing a compiled list of directories in
which to search for libraries and an ordered list
of candidate libraries.
/etc/ld.so.preload File containing a whitespace separated list of ELF
shared libraries to be loaded before the program.
libraries and an ordered list of candidate
/etc/ld.so.nohwcap When this file is present the dynamic linker will
load the non-optimized version of a library, even
if the CPU supports the optimized version.
lib*.so* shared libraries
Currently ld.so has no means of unloading and searching for compatible
or newer version of libraries.
ld.so functionality is only available for executables compiled using
libc version 4.4.3 or greater.
David Engel, Eric Youngdale, Peter MacDonald, Hongjiu Lu, Linus Tor
valds, Lars Wirzenius and Mitch DSouza (not necessarily in that
14 March 1998 LD.SO(8)