ldd
CommandThe "ldd" command shows you what libraries a binary depends on, and whether it has found them. Of course, if you can find a proper listing for your application in a Packages file on the feed you got it from, the dependencies should be listed there. If not, then "ldd" can come to the rescue.
The basic command is very simple:
ldd [exact path to binary file]
If you do not know the exact location of the binary, use the "which"
command.
The example here shows the dependencies of "opie-sh":
bash-2.05# which opie-sh
/home/QtPalmtop/bin/opie-sh
bash-2.05#
Example output:
bash-2.05# ldd /home/QtPalmtop/bin/opie-sh
libqpe.so.1 => /home/QtPalmtop/lib/libqpe.so.1 (0x40022000)
libqte.so.2 => /home/QtPalmtop/lib/libqte.so.2 (0x4019d000)
libc.so.6 => /home/QtPalmtop/lib/libc.so.6 (0x40516000)
libdl.so.2 => /lib/libdl.so.2 (0x40631000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x4063c000)
libm.so.6 => /lib/libm.so.6 (0x40671000)
libjpeg.so.62 => /home/QtPalmtop/lib/libjpeg.so.62 (0x4069f000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
bash-2.05#
I extracted my copy of "ldd"
from
the arm
utilities package, available at:
http://quickening.zapto.org/ZaurusFeed/Non-IPKs/armutils.tgz
You can get a gzipped copy of the GNU libc version
2.1.3
of the "ldd"
script I extracted from the above arm
utilities
package, which I am using on my sl5500, Sharp ROM 2.38,
as well as on my sl6000L, running Sharp
ROM 1.12
, at:
http://www.sdjf.esmartdesign.com/files/ldd-2.1.3.gz
You can also get a copy of version 2.3.2
at:
http://quickening.zapto.org/ZaurusFeed/Non-IPKs/ldd-2.3.2-arm
"ldd" is a bash
script, and is part of the GNU C Library, so I believe the version that works on my both
my sl5500 and my Tosa, should run on most Zaurii, whatever ROM or architecture they have, as long as they have "bash"
.
I am not an expert at using the options for the "ldd" command,
so I need to refer you to the "man"
page if you want
to learn more about them.
Revised October 9, 2011