Checksums of a.outs 
Author Message
 Checksums of a.outs

Should the checksums of two executables made from the exact same code
be equal?  The executables were made at different times of course but
on the same machine.

I am trying to verify what is in executables.  I've inherited "loosely
controlled" c source and would like to get re-baselined and I thought
that I could checksum the executables to understand what was used to
build them - but I'm seeing different checksums (even with a simple
hello.c program).

HP-UX XXXX B.11.00 U 9000/800
c compiler (/usr/bin/cc).
"default" flags

* Sent from RemarQ http://www.*-*-*.com/ The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



Sat, 03 Aug 2002 03:00:00 GMT  
 Checksums of a.outs

Quote:

> Should the checksums of two executables made from the exact same code
> be equal?  The executables were made at different times of course but
> on the same machine.

there's no reason why they should be exactly the same.  a compiler might,
for instance, imbed the time of compilation into the binary.

--
              /"\                              m i k e    b u r r e l l

               X        AGAINST HTML MAIL      http://mikpos.dyndns.org
              / \



Sat, 03 Aug 2002 03:00:00 GMT  
 Checksums of a.outs
: > Should the checksums of two executables made from the exact same code
: > be equal?  The executables were made at different times of course but
: > on the same machine.

: there's no reason why they should be exactly the same.  a compiler might,
: for instance, imbed the time of compilation into the binary.

Consider also the Standard C macros __TIME__ and __DATE__.  Any two
compilations of code that use them will probably yield different
checksums.



Sat, 03 Aug 2002 03:00:00 GMT  
 Checksums of a.outs


Quote:

>> Should the checksums of two executables made from the exact same code
>> be equal?  The executables were made at different times of course but
>> on the same machine.

>there's no reason why they should be exactly the same.  a compiler might,
>for instance, imbed the time of compilation into the binary.

And many (if not all) do.
Mark McIntyre

C- FAQ: http://www.eskimo.com/~scs/C-faq/top.html



Sun, 04 Aug 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Colour print outs of source code ?

2. Checksum of a file?

3. credit card checksums in C#?

4. calculating a (crc) checksum

5. Need simple checksum algorithm

6. IP Checksum

7. CRC checksum program with error

8. ip checksum calculations

9. checksums :)

10. Building Checksum from String

11. File checksum algorithm/code in C

12. Fletcher checksum???

 

 
Powered by phpBB® Forum Software