Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
PHP Web Host - Quality Web Hosting For All PHP Applications

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 64 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

ld.so



DESCRIPTION

       The  programs  ld.so  and  ld-linux.so*  find and load the
       shared libraries needed by a program, prepare the  program
       to run, and then run it.

       Linux  binaries  require  dynamic  linking (linking at run
       time) unless the -static option was  given  to  ld  during
       compilation.

       The  program  ld.so  handles a.out binaries, a format used
       long ago; ld-linux.so* handles ELF (/lib/ld-linux.so.1 for
       libc5, /lib/ld-linux.so.2 for glibc2), which everybody has
       been using for years now.  Otherwise both  have  the  same
       behaviour,  and  use  the  same support files and programs
       ldd(1), ldconfig(8) and /etc/ld.so.conf.

       The shared libraries needed by the  program  are  searched
       for in various places:

       o      (ELF  only)  Using  the  DT_RPATH  dynamic  section
              attribute of the binary if present  and  DT_RUNPATH
              attribute  does not exist.  Use of DT_RPATH is dep­
              recated.

       o      Using  the  environment  variable  LD_LIBRARY_PATH.
              Except if the executable is a setuid/setgid binary,
              in which case it is ignored.

       o      (ELF only) 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  nodeflib  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.


SYNOPSIS

       The dynamic linker can be run  either  indirectly  through
       running  some  dynamically  linked  program or library (in
       which case no command line options to the  dynamic  linker
       can  be  passed  and,  in the ELF case, the dynamic linker
       which is stored in the .interp section of the  program  is
       executed) or directly by running:

       /lib/ld-linux.so.*  [OPTIONS] [PROGRAM [ARGUMENTS]]

              glibc2  for  about  one  hour.  Then it was renamed
              into:

       --inhibit-rpath LIST


ENVIRONMENT

       There are four important environment variables.

       LD_LIBRARY_PATH
              A colon-separated list of directories in  which  to
              search  for ELF libraries at execution-time.  Simi­
              lar to the PATH environment variable.

       LD_PRELOAD
              A whitespace-separated list  of  additional,  user-
              specified, ELF shared libraries to be loaded before
              all others.  This can be used to selectively  over­
              ride  functions  in  other  shared  libraries.  For
              setuid/setgid ELF binaries, only libraries  in  the
              standard  search  directories  that are also setuid
              will be loaded.

       LD_BIND_NOW
              (libc5; glibc since  2.1.1)  If  set  to  non-empty
              string,  causes  the  dynamic linker to resolve all
              symbols at program  startup  instead  of  deferring
              function  call  resolval to the point when they are
              first referenced.  This  is  useful  when  using  a
              debugger.

       LD_TRACE_LOADED_OBJECTS
              (ELF  only)  If set to non-empty string, causes the
              program to list its dynamic  library  dependencies,
              as if run by ldd(1), instead of running normally.

       Then  there  are  lots  of more or less obscure variables,
       many obsolete or only for internal use.

       LD_WARN
              (ELF only)(glibc since 2.1.3) If set  to  non-empty
              string, warn about unresolved symbols.

       LD_NOWARN
              (a.out  only)(libc5)  Suppress warnings about a.out
              libraries with incompatible minor version  numbers.

       LD_BIND_NOT
              (glibc  since 2.1.95) Do not update the GOT (global
              offset table) and  PLT  (procedure  linkage  table)
              after resolving a symbol.

       LD_DEBUG
              put symbol versioning information about the program
              if querying  information  about  the  program  (ie.
              either  LD_TRACE_LOADED_OBJECTS  has  been  set, or
              --list or --verify options have been given  to  the
              dynamic linker).

       LD_PROFILE
              (glibc since 2.1) Shared object to be profiled.

       LD_PROFILE_OUTPUT
              (glibc  since  2.1)  File  where  LD_PROFILE output
              should  be  stored,  default  is  standard  output.
              LD_DEBUG_OUTPUT  is ignored for setuid/setgid bina­
              ries.

       LD_AOUT_LIBRARY_PATH
              (libc5) Version of LD_LIBRARY_PATH for a.out  bina­
              ries only.  Old versions of ld-linux.so.1 also sup­
              ported LD_ELF_LIBRARY_PATH.

       LD_AOUT_PRELOAD
              (libc5) Version of LD_PRELOAD  for  a.out  binaries
              only.  Old versions of ld-linux.so.1 also supported
              LD_ELF_PRELOAD.

       LD_SHOW_AUXV
              (glibc since 2.1) Show auxiliary  array  passed  up
              from the kernel.

       LD_HWCAP_MASK
              (glibc since 2.1) Mask for hardware capabilities.

       LD_ORIGIN_PATH
              (glibc  since  2.1)  Path where the binary is found
              (for non-setuid programs).

       LD_DYNAMIC_WEAK
              (glibc since 2.1.91) Allow weak symbols to be over­
              ridden (reverting to old glibc behaviour).

       LD_KEEPDIR
              (a.out  only)(libc5)  Don't ignore the directory in
              the names of a.out libraries to be loaded.  Use  of
              this option is strongly discouraged.

       LDD_ARGV0
              (libc5)  argv[0]  to be used by ldd(1) when none is
              present.


FILES

       /lib/ld.so
              a.out dynamic linker/loader


NOTES

       The  ld.so functionality is available for executables com­
       piled using libc version 4.4.3 or greater.  ELF  function­
       ality is available since Linux 1.1.52 and libc5.


SEE ALSO

       ldd(1), ldconfig(8)

                            2001-12-16                   ld.so(8)
  
Help us cut cost by not downloading the whole site!
Use of automated download sofware ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and therefore is expressedly prohibited. For more details on this, take a look here

Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
You can get all the latest Site and Linux news by checking out our news page.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds