I am running these two commands, and I'm getting different output:
$ ldd `which ls`
linux-gate.so.1 => (0x00db3000)
libselinux.so.1 => /lib/i386-linux-gnu/libselinux.so.1 (0x00ba2000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0x007bf000)
libacl.so.1 => /lib/i386-linux-gnu/libacl.so.1 (0x004ce000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0x00110000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0x00398000)
/lib/ld-linux.so.2 (0x00dea000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0x00a83000)
libattr.so.1 => /lib/i386-linux-gnu/libattr.so.1 (0x00d3d000)
and then
objdump -x `which ls` | grep NEEDED
NEEDED libselinux.so.1
NEEDED librt.so.1
NEEDED libacl.so.1
NEEDED libc.so.6
What's up with that? I thought they both gave the library dependencies? The reason I care is that I suspect ldd
is the correct one, but I'm working on linux on ARM, where there is no ldd from what I can tell...