1LD.SO(8)                   Linux Programmer's Manual                  LD.SO(8)
2
3
4

NAME

6       ld.so, ld-linux.so - dynamic linker/loader
7

SYNOPSIS

9       The dynamic linker can be run either indirectly by running some dynami‐
10       cally linked program or shared object (in which  case  no  command-line
11       options  to  the dynamic linker can be passed and, in the ELF case, the
12       dynamic linker which is stored in the .interp section of the program is
13       executed) or directly by running:
14
15       /lib/ld-linux.so.*  [OPTIONS] [PROGRAM [ARGUMENTS]]
16

DESCRIPTION

18       The  programs  ld.so  and ld-linux.so* find and load the shared objects
19       (shared libraries) needed by a program, prepare the program to run, and
20       then run it.
21
22       Linux binaries require dynamic linking (linking at run time) unless the
23       -static option was given to ld(1) during compilation.
24
25       The program ld.so handles a.out binaries, a  binary  format  used  long
26       ago.    The   program   ld-linux.so*   (/lib/ld-linux.so.1  for  libc5,
27       /lib/ld-linux.so.2 for glibc2) handles binaries that are  in  the  more
28       modern  ELF  format.  Both programs have the same behavior, and use the
29       same   support   files   and   programs   (ldd(1),   ldconfig(8),   and
30       /etc/ld.so.conf).
31
32       When resolving shared object dependencies, the dynamic linker first in‐
33       spects each dependency string to see if it contains a slash  (this  can
34       occur  if  a shared object pathname containing slashes was specified at
35       link time).  If a slash is found, then the dependency string is  inter‐
36       preted  as  a (relative or absolute) pathname, and the shared object is
37       loaded using that pathname.
38
39       If a shared object dependency does not contain  a  slash,  then  it  is
40       searched for in the following order:
41
42       o  Using  the directories specified in the DT_RPATH dynamic section at‐
43          tribute of the binary if present and DT_RUNPATH attribute  does  not
44          exist.  Use of DT_RPATH is deprecated.
45
46       o  Using  the  environment  variable  LD_LIBRARY_PATH,  unless the exe‐
47          cutable is being run in secure-execution mode (see below), in  which
48          case this variable is ignored.
49
50       o  Using  the  directories  specified in the DT_RUNPATH dynamic section
51          attribute of the binary if present.  Such directories  are  searched
52          only  to  find those objects required by DT_NEEDED (direct dependen‐
53          cies) entries and do not apply to  those  objects'  children,  which
54          must  themselves  have their own DT_RUNPATH entries.  This is unlike
55          DT_RPATH, which is applied to searches for all children in  the  de‐
56          pendency tree.
57
58       o  From the cache file /etc/ld.so.cache, which contains a compiled list
59          of candidate shared objects previously found in  the  augmented  li‐
60          brary path.  If, however, the binary was linked with the -z nodeflib
61          linker option, shared objects in  the  default  paths  are  skipped.
62          Shared objects installed in hardware capabi