ldd - Linux

This is a discussion on ldd - Linux ; I am having trouble understandfing this command. The ldd. I have tried to ldd files and I must not be using the right switches. Man pages haven't help much either and info is a copy of the man page. What ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: ldd

  1. ldd

    I am having trouble understandfing this command. The ldd. I have tried
    to ldd files and I must not be using the right switches. Man pages haven't
    help much either and info is a copy of the man page. What exactly is this
    command for?

    Bill



  2. Re: ldd

    On Thu, 11 Jan 2007 02:23:43 +0000, Bill Cunningham wrote:

    > I am having trouble understandfing this command. The ldd. I have tried
    > to ldd files and I must not be using the right switches.


    The ldd(1) command will show you exactly which shared libraries a program
    will use when the program is actually run. For example:

    $ ldd /bin/echo
    linux-gate.so.1 => (0x00851000)
    libc.so.6 => /lib/libc.so.6 (0x00bb8000)
    /lib/ld-linux.so.2 (0x00b9b000)

    The the shared program loader ld.so(8) is transforming "/bin/echo" into an
    executable image in memory, it has to resolve the name the program
    uses, for example "libc.so" into a particular shared library file, in
    this example "/lib/libc.so.6" will be used. The rules for how
    ld.so(8) looks up these shared libraries and associates their name is
    a world unto itself. This ldd(1) program shows you which shared
    libraries will be used if you were to run that program, right now.
    Another user, with a different setup environment, could very well get
    different results.

    HTH

  3. Re: ldd


    "Tommy Reynolds" wrote in message
    news:0sOdnehpu8bCOzjYnZ2dnUVZ_tadnZ2d@comcast.com. ..
    > On Thu, 11 Jan 2007 02:23:43 +0000, Bill Cunningham wrote:
    >
    >> I am having trouble understandfing this command. The ldd. I have tried
    >> to ldd files and I must not be using the right switches.

    >
    > The ldd(1) command will show you exactly which shared libraries a program
    > will use when the program is actually run. For example:
    >
    > $ ldd /bin/echo
    > linux-gate.so.1 => (0x00851000)
    > libc.so.6 => /lib/libc.so.6 (0x00bb8000)
    > /lib/ld-linux.so.2 (0x00b9b000)
    >
    > The the shared program loader ld.so(8) is transforming "/bin/echo" into an
    > executable image in memory, it has to resolve the name the program
    > uses, for example "libc.so" into a particular shared library file, in
    > this example "/lib/libc.so.6" will be used. The rules for how
    > ld.so(8) looks up these shared libraries and associates their name is
    > a world unto itself. This ldd(1) program shows you which shared
    > libraries will be used if you were to run that program, right now.
    > Another user, with a different setup environment, could very well get
    > different results.
    >
    > HTH


    I often times if I am adding libraries to usr/local/lib for example edit
    the ld.so.conf file to include this path then run the ldconfig command. I
    hope I'm doing the right thing there. It's just a habit I've gotten into.

    Bill



+ Reply to Thread