Unix administration - binary files differ

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > January 2004 > binary files differ





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author binary files differ
B Raghunath

2004-01-23, 5:07 pm

Hi,

On Digital Unix i observed that the binary files differ each time
i compile. How to avoid this ?

For eg.,

I wrote a test program
------------------------------
main()
{
printf ("hello \n");
}
------------------------------
# cc test.c -o test
# mv test test1
# cc test.c -o test
# diff test test1
Binary files test and test1 differ

Regards
Raghu.
Andreas Kahari

2004-01-23, 5:07 pm

In article <445dbc08.0311022224.53784aab@posting.google.com>, B Raghunath wrote:
quote:

> Hi,
>
> On Digital Unix i observed that the binary files differ each time
> i compile. How to avoid this ?



Make hex dumps of the files (with hexdump or od or some other
tool) and see where they differ to find out what the actual
different data is.

The compiler, assembler, or linker might add datestamps,
checksums, random stack protection offsets etc.

You may not be able to do anything about that. Read the
documentation for your compiler.

--
Andreas Kähäri
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com