Operating System - HP-UX
1752762 Members
4948 Online
108789 Solutions
New Discussion юеВ

Re: 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 3
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.
 
--
ranga
[i work for hpe]

Accept or Kudo

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".