*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> ld.so (1)              



NAME    [Toc]    [Back]

     ld.so - run-time link-editor

DESCRIPTION    [Toc]    [Back]

     ld.so is a self-contained, position independent program  image providing
     run-time support for loading and link-editing shared objects
into a process's
 address space.  It  uses  the  data  structures  (see
link(5)) contained
 within dynamically linked programs to determine which
shared libraries
 are needed and loads them at  a  convenient  virtual
address using
     the mmap(2) system call.

     After  all  shared  libraries have been successfully loaded,
ld.so proceeds
     to resolve external references from both  the  main  program
and all objects
     loaded.  A mechanism is provided for initialization routines
to be
     called, on a per-object basis, giving a shared object an opportunity to
     perform  any  extra  set-up, before execution of the program
proper begins.

     ld.so is itself a shared object that is initially loaded  by
the kernel.

     To  quickly  locate  the  required  shared  objects  in  the
filesystem, ld.so
     may use a ``hints'' file, prepared by the ldconfig(8) utility, in which
     the  full  path  specification  of the shared objects can be
looked up by
     hashing on the 3-tuple <library-name,  major-version-number,

     ld.so  recognises a number of environment variables that can
be used to
     modify its behaviour as follows:

             A colon separated list  of  directories,  overriding
the default
             search  path for shared libraries.  This variable is
ignored for
             set-user-ID and set-group-ID executables.

             A colon separate list of library names to  load  before any of the
             regular  libraries are loaded.  This variable is ignored for setuser-ID
 and set-group-ID executables.

             Specifies that the dynamic linker should process all
             before transferring control to the program.  Normally, the procedure
  linkage  table  entries  are  handled  lazily,
avoiding symbol
             lookup  and  relocation  for unused functions.  This
variable is ignored
 for set-user-ID and set-group-ID  executables.

             When  set,  issue  a warning whenever a link-editing
operation requires
 modification of  the  text  segment  of  some
loaded object.
             This  is  usually indicative of an incorrectly built
library.  <not
             yet supported>

             When set, no warning messages of any  kind  are  issued.  Normally,
             a warning is given if a satisfactorily versioned library could
             not be found.  <not yet supported>

             When set, causes ld.so to  exit  after  loading  the
shared objects
             and  printing  a summary which includes the absolute
pathnames of
             all objects, to standard output.

             When set, these variables are interpreted as  format
strings a la
             printf(3) to customize the trace output and are used
by ldd(1)'s
             -f option and allows ldd(1) to be operated as a filter more conveniently.
  The following conversions can be used:

             %a      The  main  program's  name  (also  known  as

             %A    The value of the environment variable
                   LD_TRACE_LOADED_OBJECTS_PROGNAME.   <not   yet

             %o    The library name.

             %m    The library's major version number.

             %n    The library's minor version number.

             %p    The full pathname as determined by ld.so's library search

             %x    The library's load address.

             Additionally,n ant are  recognised  and  have  their
usual meaning.
  <not yet supported>

             When set, ld.so does not process any internal search
paths that
             were recorded in the executable.  <not yet  supported>

             When  set,  do  not load shared objects or libraries
dependent objects
 in random order.  This variable is ignored for
             and set-group-ID executables.

             <not  yet  supported> When set, do not include a set
of built-in
             standard directory paths for searching.  This  might
be useful
             when running on a system with a completely non-standard filesystem
             When set, be verbose about what ld.so does.

FILES    [Toc]    [Back]

     /var/run/ld.so.hints     library location hints built by ldconfig(8)

SEE ALSO    [Toc]    [Back]

     ld(1), link(5), ldconfig(8)

HISTORY    [Toc]    [Back]

     The  shared  library  model employed first appeared in SunOS

OpenBSD     3.6                           June      27,      1995
[ Back ]
 Similar pages
Name OS Title
ld_pa HP-UX link editor
abild IRIX ABI link editor
ld IRIX link editor
ld HP-UX link editor
ld_ia HP-UX link editor
ld Tru64 link editor
btxld FreeBSD link editor for BTX clients
create_link HP-UX Creates a soft link and optionally specifies an expiration time and an extension time
a.out HP-UX assembler and link editor output
a.out Tru64 Assembler and link editor output
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service