Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What libs for what bins?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Locarius
n00b
n00b


Joined: 16 Apr 2004
Posts: 71
Location: Ottawa, Canada

PostPosted: Sun Jun 26, 2005 6:25 pm    Post subject: What libs for what bins? Reply with quote

I am looking for a way to check which files in /usr/lib (or wherever) are called by which programs. I have set up a tempfs in RAM and I only want certain apps/libs there to save space. Say I wanted to check which libs belong to /usr/bin/firefox, is there a command I can issue to find this?

Thanks in advance.
Back to top
View user's profile Send private message
SinoTech
Advocate
Advocate


Joined: 20 Mar 2004
Posts: 2579
Location: Neunkirchen / Saarland / Germany

PostPosted: Sun Jun 26, 2005 7:09 pm    Post subject: Re: What libs for what bins? Reply with quote

Locarius wrote:
I am looking for a way to check which files in /usr/lib (or wherever) are called by which programs. I have set up a tempfs in RAM and I only want certain apps/libs there to save space. Say I wanted to check which libs belong to /usr/bin/firefox, is there a command I can issue to find this?

Thanks in advance.

"ldd" is your friend
Example:
Code:

$ ldd /usr/bin/xmms

linux-gate.so.1 =>  (0xffffe000)
   libSM.so.6 => /usr/lib/libSM.so.6 (0xb7fcc000)
   libICE.so.6 => /usr/lib/libICE.so.6 (0xb7fb4000)
   libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb7fae000)
   libxmms.so.1 => /usr/lib/libxmms.so.1 (0xb7f9c000)
   libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0xb7e46000)
   libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0xb7e0d000)
   libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0xb7e09000)
   libgthread-1.2.so.0 => /usr/lib/libgthread-1.2.so.0 (0xb7e06000)
   libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0xb7de1000)
   libpthread.so.0 => /lib/libpthread.so.0 (0xb7dce000)
   libdl.so.2 => /lib/libdl.so.2 (0xb7dca000)
   libXi.so.6 => /usr/lib/libXi.so.6 (0xb7dc2000)
   libXext.so.6 => /usr/lib/libXext.so.6 (0xb7daf000)
   libX11.so.6 => /usr/lib/libX11.so.6 (0xb7cd5000)
   libm.so.6 => /lib/libm.so.6 (0xb7cb2000)
   libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0xb7c81000)
   libc.so.6 => /lib/libc.so.6 (0xb7b66000)
   /lib/ld-linux.so.2 (0xb7feb000)
   libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0xb7a5f000)


Mfg

Sino
Back to top
View user's profile Send private message
Locarius
n00b
n00b


Joined: 16 Apr 2004
Posts: 71
Location: Ottawa, Canada

PostPosted: Sun Jun 26, 2005 7:16 pm    Post subject: Reply with quote

Thanks, this is just what I wanted :)
Back to top
View user's profile Send private message
dkmweeks
Apprentice
Apprentice


Joined: 26 Apr 2005
Posts: 202
Location: Tampa, Florida, USA

PostPosted: Mon Jun 27, 2005 1:17 am    Post subject: Reply with quote

Mind you that ldd is an itterative process. If you want anything more that a case by case, by hand tooled method, you've got lots of bash to learn, and need helper programs like uniq to build a "hit list." sed and awk loom in your future too.

Of course, such a script would be of great interest to the community.8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum