Groups | Blog | Home
all groups > dotnet general > june 2004 >

dotnet general : Same code build twice => diff binary



AlexS
6/5/2004 11:12:24 AM
Hi, Viviana

depending on settings you can get different timestamps and versions in
binaries. Which will cause different hashes and some other fields - don't
remember now exactly wich ones. If you are really interested - check PE
format description for .Net assemblies on MSDN.

HTH
Alex

[quoted text, click to view]

Jochen Kalmbach
6/5/2004 12:16:41 PM
[quoted text, click to view]

At least the time-stamp is different.



[quoted text, click to view]

In general: No. You can change the timestamp "by hand".


For more info see:
Microsoft Portable Executable and Common Object File Format
Specification
http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx


It was already discussed several times in some newsgroups; see for
example:
http://groups.google.de/groups?&threadm=enwAkowrBHA.600%40tkmsftngp04


--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server?
Allan Bruce
6/5/2004 2:05:15 PM

[quoted text, click to view]

void main(){} is undefined bahaviour therefore the compiler is free to do
what it wants. Vey unlikely this is the cause however. I am not sure about
the format of an exe, but could it be the timestamps that are causing them
to be different?
Allan

Viviana Vc
6/5/2004 2:55:45 PM
Hi all,

I am using Win2k, VS. NET 7.1 (MS development Environment 2003 7.1.3088)
and I noticed that by building the exact same code twice the generated
binaries are different (not much, but they are). To be sure I tried a
simple console application like void main(){} and 2 times rebuilding the
project gets 2 different binaries.

Has anybody any clue why this happens?
Could I somehow change a setting or something to remove those diff (I
mean from the same code to get identical binaries)?

Thanks in advance,
Viviana Vc
6/5/2004 4:20:24 PM
I found the following article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;164151
which tells that indeed the timestamp is the diff, but I couldn't find
in VC++ IDE any setting to disable the timepstamp stuff, and I assume
this should be somehow doable.

Thx,
Viv

On Sat, 05 Jun 2004 14:55:45 +0200, Viviana Vc <vcotirlea@hotmail.com>
wrote :

[quoted text, click to view]
AddThis Social Bookmark Button