Repeated gcc yields differing .exe files
Shankar Unni
shankar@cotagesoft.com
Fri Dec 20 12:11:00 GMT 2002
fergus@bonhard.uklinux.net wrote:
> The fact that hello.exe alters seems a bit non-optimal to me, given that
> md5sums are a pretty standard way for people like you and me to check that
> we're running the same stuff, intended to do the same thing. Incidentally,
> it's always the same two bytes that alter:
As egor said: it's the timestamp. Almost every object file format in use
today has compilation timestamps to identify when the executable was
created; many even have other tagging information identifying the
compilation environment.
It's a completely invalid assumption that the same source compiled twice
will give identical binary files. This is a GOOD thing, because it
identifies a *binary* precisely, you know if it has been replaced, even
with something "identical". This is especially important when you're
installing a full installation of some product with many files - you can
take an overall checksum of everything, and verify that nothing has been
touched or tampered with.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list