[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#317082: Not just a dpkg bug



Frank Lichtenheld <djpig@debian.org> writes:

> This isn't quite true I think. The current dpkg-shlibdeps code works
> like this:

> 1) use "ldd <binary>" to find the paths to the linked libraries
> 2) use "objdump -p <binary>" to actually check which of this libraries
>    are listed as NEEDED (Are there cases where ldd lists
>    libraries that are not NEEDED?)

Yes.  ldd will list all shared libraries pulled in by a binary, regardless
of whether they're NEEDED by the binary itself or just NEEDED by one of
the shared libraries it uses.  For example:

windlord:~> ldd /usr/bin/remctl
        linux-gate.so.1 =>  (0xffffe000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xb7f8e000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7e57000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xb7ddf000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xb7dbb000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0xb7db8000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0xb7db3000)
        libresolv.so.2 => /lib/tls/libresolv.so.2 (0xb7da0000)
        /lib/ld-linux.so.2 (0xb7fb3000)
windlord:~> objdump -p /usr/bin/remctl | grep NEEDED
  NEEDED      libgssapi_krb5.so.2
  NEEDED      libc.so.6
windlord:~> objdump -p /usr/lib/libgssapi_krb5.so.2 | grep NEEDED
  NEEDED      libkrb5.so.3
  NEEDED      libk5crypto.so.3
  NEEDED      libcom_err.so.2
  NEEDED      libkrb5support.so.0
  NEEDED      libresolv.so.2
  NEEDED      libc.so.6

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: