Operating System - HP-UX
1827444 Members
6049 Online
109965 Solutions
New Discussion

Re: Finding objects that makeup executable

 
vinod taireddy
New Member

Finding objects that makeup executable

How to find objects that make executable?
i didnt had a luck with
cc -Wl,-v -o exe_file |& grep Loading
3 REPLIES 3
F. X. de Montgolfier
Valued Contributor

Re: Finding objects that makeup executable

I'm not really sure of what you mean:

if you want to see all the objects in an executable, try nm.
Manpage:
http://docs.hp.com/hpux/onlinedocs/B2355-90680/B2355-90680.html

If you want to see the shared libraries for an executable, try ldd

Manpage:
http://docs.hp.com/hpux/onlinedocs/B2355-90680/B2355-90680.html

Hope this helps!

Cheers,

FiX

vinod taireddy
New Member

Re: Finding objects that makeup executable

if iam not wrong nm displays symbol table info about a file which is either
1)object file or
2)executalble object file

how to know all objects that make up an executable,usually we can do HP platform using
cc -Wl,-v -o exe_file |& grep Loading.
but couldnt find anything.
Mike Stroyan
Honored Contributor

Re: Finding objects that makeup executable

The -Wl,-v style should show all the .o files that an exe has pulled in from archive libraries. It won't show any individual files within referenced shared libraries. Each shared library is used in a largely all-or-nothing manner.
For an unstripped 32-bit PA-RISC executable you can use
odump -compunit a.out
to see all of the source files that went into an a.out or shared library. (It depends on the compiler putting the right information into each .o file. HP compilers do that but gcc won't.)
For a 64-bit or IPF executable use
elfdump -dc a.out
for the same kind of list.