Re: How to find out what libraries a binary calls?




ynotssor wrote:
"composlinuxmisc" <altcomphardware@xxxxxxxxxxx> wrote in message
news:1156979845.206927.60010@xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Is there a way for me to tell what library a binary calls?

Examine the output of "strace binary".

Thanks ynotssor. The following is the "grep'ed lib" output of:

strace -o output.txt ls-dyna

--------------------------
stat("/opt/intel/fce/9.1.036/lib/tls/x86_64", 0x7fffffb1fc90) = -1
ENOENT (No such file or directory)
open("/opt/intel/fce/9.1.036/lib/tls/libpthread.so.0", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/opt/intel/fce/9.1.036/lib/tls", 0x7fffffb1fc90) = -1 ENOENT (No
such file or directory)
open("/opt/intel/fce/9.1.036/lib/x86_64/libpthread.so.0", O_RDONLY) =
-1 ENOENT (No such file or directory)
stat("/opt/intel/fce/9.1.036/lib/x86_64", 0x7fffffb1fc90) = -1 ENOENT
(No such file or directory)
open("/opt/intel/fce/9.1.036/lib/libpthread.so.0", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/opt/intel/fce/9.1.036/lib", {st_mode=S_IFDIR|0755, st_size=1512,
....}) = 0
open("/usr/pgi/linux86-64/5.2/lib/tls/x86_64/libpthread.so.0",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/pgi/linux86-64/5.2/lib/tls/x86_64", 0x7fffffb1fc90) = -1
ENOENT (No such file or directory)
open("/usr/pgi/linux86-64/5.2/lib/tls/libpthread.so.0", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/usr/pgi/linux86-64/5.2/lib/tls", 0x7fffffb1fc90) = -1 ENOENT (No
such file or directory)
open("/usr/pgi/linux86-64/5.2/lib/x86_64/libpthread.so.0", O_RDONLY) =
-1 ENOENT (No such file or directory)
stat("/usr/pgi/linux86-64/5.2/lib/x86_64", 0x7fffffb1fc90) = -1 ENOENT
(No such file or directory)
open("/usr/pgi/linux86-64/5.2/lib/libpthread.so.0", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/usr/pgi/linux86-64/5.2/lib", 0x7fffffb1fc90) = -1 ENOENT (No
such file or directory)
open("/lib64/tls/libpthread.so.0", O_RDONLY) = 3
open("/opt/intel/fce/9.1.036/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/lib64/tls/libc.so.6", O_RDONLY) = 3
open("/opt/intel/fce/9.1.036/lib/libm.so.6", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/lib64/tls/libm.so.6", O_RDONLY) = 3

--------------------------

Does it look right considering that I'm running it on an AMD64 CPU?

.



Relevant Pages

  • Re: One User Cant Play WAV Files
    ... I've tried comparing ... Using "strace", I get this: ... ENOENT ...
    (alt.os.linux.suse)
  • Re: About "time yum --help".
    ... The openENOENT calls are commonly quick. ... strace has flags that help you time system calls. ... Run it through strace twice in a row with different log files and the ... T o m M i t c h e l l spam unwanted email. ...
    (Fedora)
  • Re: SSH on armv5tel: "You dont exist, go away!"
    ... What if you strace it like this? ... For NIS setups you should see a sendtocall being made to your NIS ... -1 ENOENT ... PS We're working with a "minimal" Linux version running on such PXA ...
    (comp.security.ssh)
  • Re: epiphany-browser and iceweasel do not start
    ... From the strace log: ... like the problem comes out of libxul. ... I can't tell for iceweasel, but for epiphany, the root of your problem ... ENOENT ...
    (Debian-User)
  • Slow su -
    ... What can cause this delay and where can I look to solve it? ... I have done a `strace -oroot.txt su`. ... ENOENT ... You are about to enter another dimension, ...
    (alt.os.linux.suse)