[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    RE: HPUX-DEVTOOLS: cksum of compiler-generated binaries always di
From:       "BENNETT,ANDY (HP-Unitedkingdom,ex1)" <andy_bennett () hp ! com>
Date:       2001-04-23 7:57:06
[Download RAW message or body]

Have a look at "man a.out" for the formatting information about a binary
file format. In particular, they do contain date information, and I don't
think it is just in the header. If you do wish to compare the executables,
your best bet would be to find the $TEXT$ and $PRIVATE$ spaces based on the
header information and the data it points to and then calculate a checksum
based on just those parts of the file. Since these are only the parts of the
file the kernel loads into memory during execution, just checking these is
probably sufficient.

Regards,
Andy.

> -----Original Message-----
> From: Albert Chin-A-Young [mailto:china@thewrittenword.com]
> Sent: 21 April 2001 05:57
> To: hpux-devtools@cxx.cup.hp.com
> Subject: HPUX-DEVTOOLS: cksum of compiler-generated binaries always
> different
> 
> 
> $ cc a.c
> $ cksum a.out
> 1592417294 53448 a.out
> $ cc a.c
> $ cksum a.out
> 3613442843 53448 a.out
> 
> Any way to get the compiler to generate the *same* checksum if nothing
> has changed? Maybe it adds the timestamp to the executable?
> 
> -- 
> albert chin (china@thewrittenword.com)
>  _________________________________________________________________
>  To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
>     with the message UNSUBSCRIBE hpux-devtools
>  _________________________________________________________________
> 
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic