LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   To find the dependencies of statically linked executable (https://www.linuxquestions.org/questions/linux-newbie-8/to-find-the-dependencies-of-statically-linked-executable-927310/)

Mayurapriyan 02-02-2012 10:01 PM

To find the dependencies of statically linked executable
 
Hi,
As we used to find the shared library dependencies of a dynamic executable( using ldd or objdump), is there any way to find the libraries that are in the statically linked executable..

regards
mayur

tronayne 02-03-2012 03:21 PM

If you mean that you want to know for a compiled and linked executable, you can use nm. nm lists the symbol table from object files and is usable both with a .o and with the executable; there are a number of options, see the manual page for details of what is displayed and how to alter what is displayed..

Note that nm will not show anything for an executable that has been stripped (striped means that the object table is no longer part of the executable); you'd see
Code:

nm file: no symbols
in that case.

Hope this helps some.


All times are GMT -5. The time now is 09:58 AM.