General
cancel
Showing results for 
Search instead for 
Did you mean: 

how to list the objects in an exec file

unix_starter
Occasional Contributor

how to list the objects in an exec file

hello all,
how can i list the all the object files that a executable has.
i tried using nm but it is listing all the symbols for the exec file.

please help.
thanks in advance.
3 REPLIES
OldSchool
Honored Contributor

Re: how to list the objects in an exec file

"chatr" will help you sort out the libraries used, at least the dynamic stuff.

for statically linked stuff, i don't know anyway to relate the symbol in the exec back to a specific object file. you would probably need all of the .o files and the associated link commands to sort it out....
ranganath ramachandra
Esteemed Contributor

Re: how to list the objects in an exec file

look at the odump(1) man page for the "-compunit" flag and elfdump(1) man page for the "-dc" flag.
Dennis Handly
Acclaimed Contributor

Re: how to list the objects in an exec file

>i tried using nm but it is listing all the symbols for the exec file.

nm -px on IPF will list the source files under "a".