Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programming way to list shared library dependency on linux

Is there any programming way (system call?) to list shared library dependency on Linux? Instead of using ldd ...

like image 657
flyingbin Avatar asked Jul 12 '11 07:07

flyingbin


2 Answers

readelf -Wa lib.so|grep NEEDED
like image 182
linuxbuild Avatar answered Nov 20 '22 16:11

linuxbuild


Gentoo Linux has an lddtree.sh http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-projects/pax-utils/lddtree.sh?revision=1.22&content-type=text%2Fplain

You may find it helpful.

like image 43
r0bertz Avatar answered Nov 20 '22 16:11

r0bertz