Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiled file size issue - any xlC guru ?

Status
Not open for further replies.

Cdenis

Technical User
Jul 1, 2003
1
CA
Hi,

I'm investigating a way of patching some binary files compiled with xlC on AIX machines. For that I need to be able to compare binary files. I'll be using MD5 key I think to do that.

But my problem is that I don't seem to be able to produce comparable binary files using my xlC. I don't know how to display its version so if you can tell me how..

I explain further:

The main options I currently use with xlC are: -g -qdbxextra -qtwolink -DAIX
( I don't use any optimisation options..)
I know this will produce debug information into my binaries including time-stamp, so it is quite normal that my binaries have different contents even when I recompile without any source update.

I used strip command to get rid of debug info and header. Then I seem to have comparable binary files for same sources. But still for some other binary files, the stripped binary file size changes from one compile to another. This prevents me from comparing the files.

My questions are:

Even while compiling without debug info, what can change in the binary files between two compiles of the same source?

Can we keep the debug info and use strip command to get comparable binary files or should I use something else?

I read through xlC doc.. But is there a way to tell which object files are included within an executable from the executable binary file itself? no luck with nm command...

Thanks in advance for any help !

Cheers
Denis

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top