visual c libraries:
[quoted text, click to view] Viviana Vc wrote: > 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 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)?
Re-building a small program, I only see a couple bytes difference around offset 0xe8 in the file. This is a timestamp that the linker puts in the PE header that tells when the image was linked. -cd
[quoted text, click to view] Viviana Vc wrote: > 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. I believe that you assume incorrectly. There is no option to suppress the timestamp - it's a required part of the PE header. -cd
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 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,
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 15:12:10 +0200, Viviana Vc <vcotirlea@hotmail.com> wrote : [quoted text, click to view] >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 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, >Viv
[quoted text, click to view] Viviana Vc wrote: > But I also get the obj different so I thought that this is a compiler > option not linker option.
There may well be timestamps in the .obj files as well, but if so, they don't influence the output of the linker. -cd
[quoted text, click to view] Viviana Vc wrote: > > That is sad :( I am having an update feature in my product, and because > of the timestamp it will have to update all the binaries, even though > they are identical. > > On Sat, 5 Jun 2004 09:18:37 -0700, "Carl Daniel [VC++ MVP]" > <cpdaniel_remove_this_and_nospam@mvps.org.nospam> wrote : > > >Viviana Vc wrote: > >> 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. > > > >I believe that you assume incorrectly. There is no option to suppress the > >timestamp - it's a required part of the PE header. > > > >-cd > > Or -- you could use a PE editor and manually change the timestamp to a value of
Maybe a different way of handling updates is required, not based on binary compares. Cheers Russell [quoted text, click to view] Viviana Vc wrote: > That is sad :( I am having an update feature in my product, and because > of the timestamp it will have to update all the binaries, even though > they are identical.
But I also get the obj different so I thought that this is a compiler option not linker option. Viv On Sat, 5 Jun 2004 06:41:41 -0700, "Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@mvps.org.nospam> wrote : [quoted text, click to view] >Viviana Vc wrote: >> 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 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)? > >Re-building a small program, I only see a couple bytes difference around >offset 0xe8 in the file. This is a timestamp that the linker puts in the PE >header that tells when the image was linked. > >-cd >
That is sad :( I am having an update feature in my product, and because of the timestamp it will have to update all the binaries, even though they are identical. On Sat, 5 Jun 2004 09:18:37 -0700, "Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@mvps.org.nospam> wrote : [quoted text, click to view] >Viviana Vc wrote: >> 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. > >I believe that you assume incorrectly. There is no option to suppress the >timestamp - it's a required part of the PE header. > >-cd >
Is there a can't you use version numbers to identify binary versions? -- Michael J. Mooney MCP+SB, MCAD, MCSD [quoted text, click to view] "Viviana Vc" <vcotirlea@hotmail.com> wrote in message news:2iiv04FnespaU2@uni-berlin.de... > That is sad :( I am having an update feature in my product, and because > of the timestamp it will have to update all the binaries, even though > they are identical. > > On Sat, 5 Jun 2004 09:18:37 -0700, "Carl Daniel [VC++ MVP]" > <cpdaniel_remove_this_and_nospam@mvps.org.nospam> wrote : > > >Viviana Vc wrote: > >> 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. > > > >I believe that you assume incorrectly. There is no option to suppress the > >timestamp - it's a required part of the PE header. > > > >-cd > > >
[quoted text, click to view] Viviana Vc wrote: > That is sad :( I am having an update feature in my product, and > because of the timestamp it will have to update all the binaries, > even though they are identical.
But that is the point, they are not identical as the two binaries have a different PE information. Why not change the diff program so that it skips over the PE header, in which case it would report no differences in the binaries. Jussi Jumppanen Author of: Zeus for Windows (All new version 3.92 out now) "The C/C++, Cobol, Java, HTML, Python, PHP, Perl programmer's editor"
Already tried that. I have used the editor downloaded from: http://www.softpedia.com/public/cat/5/4/5-4-4.shtml I changed the time stamp and still there are 2 diffs between the exes (initially there were 3 diffs). Viv On Mon, 07 Jun 2004 09:58:11 -0700, Julie <julie@nospam.com> wrote : [quoted text, click to view] >Viviana Vc wrote: >> >> That is sad :( I am having an update feature in my product, and because >> of the timestamp it will have to update all the binaries, even though >> they are identical. >> >> On Sat, 5 Jun 2004 09:18:37 -0700, "Carl Daniel [VC++ MVP]" >> <cpdaniel_remove_this_and_nospam@mvps.org.nospam> wrote : >> >> >Viviana Vc wrote: >> >> 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. >> > >> >I believe that you assume incorrectly. There is no option to suppress the >> >timestamp - it's a required part of the PE header. >> > >> >-cd >> > > >Or -- you could use a PE editor and manually change the timestamp to a value of >your liking...
Any tool I could use for skipping the PE header? As I said I already tried to change the time stamp in the PE header using a PE editor, but still there are 2 diffs between the exes (initially there were 3). Viv On Tue, 08 Jun 2004 10:32:26 +1000, Jussi Jumppanen <jussij@zeusedit.com> wrote : [quoted text, click to view] >Viviana Vc wrote: > >> That is sad :( I am having an update feature in my product, and >> because of the timestamp it will have to update all the binaries, >> even though they are identical. > >But that is the point, they are not identical as the two >binaries have a different PE information. > >Why not change the diff program so that it skips over the PE >header, in which case it would report no differences in the >binaries. > >Jussi Jumppanen >Author of: Zeus for Windows (All new version 3.92 out now) >"The C/C++, Cobol, Java, HTML, Python, PHP, Perl programmer's editor" >Home Page: http://www.zeusedit.com
Can't you include a version info resource and check the version number? Andrew [quoted text, click to view] "Viviana Vc" <vcotirlea@hotmail.com> wrote in message news:2iiv04FnespaU2@uni-berlin.de... > That is sad :( I am having an update feature in my product, and because > of the timestamp it will have to update all the binaries, even though > they are identical. > > On Sat, 5 Jun 2004 09:18:37 -0700, "Carl Daniel [VC++ MVP]" > <cpdaniel_remove_this_and_nospam@mvps.org.nospam> wrote : > > > I believe that you assume incorrectly. There is no option to suppress the > > timestamp - it's a required part of the PE header. > > > > Viviana Vc wrote: > > > > > 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.
I could of course, but the problem is like this: I have let's say a binary that uses common code from other libraries, like some header files, so would be hard to know when to change the version number ... There are many developers working on the same header files, so hard to check if something has changed in order to change the version number. On Fri, 11 Jun 2004 00:28:57 +0100, "Andrew McDonald" <myrmecophagavir@no-spam-thanks.bigfoot.com> wrote : [quoted text, click to view] >Can't you include a version info resource and check the version number? > >Andrew > >"Viviana Vc" <vcotirlea@hotmail.com> wrote in message news:2iiv04FnespaU2@uni-berlin.de... > >> That is sad :( I am having an update feature in my product, and because >> of the timestamp it will have to update all the binaries, even though >> they are identical. >> >> On Sat, 5 Jun 2004 09:18:37 -0700, "Carl Daniel [VC++ MVP]" >> <cpdaniel_remove_this_and_nospam@mvps.org.nospam> wrote : >> >> > I believe that you assume incorrectly. There is no option to suppress the >> > timestamp - it's a required part of the PE header. >> > >> > Viviana Vc wrote: >> > >> > > 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. >
In message <2j5dm4FtnmhnU1@uni-berlin.de> of Mon, 14 Jun 2004 12:42:52 in comp.os.ms-windows.programmer.misc, Viviana Vc <vcotirlea@hotmail.com> writes [Poster wants an executable built twice to compare equal. Poster cross-posted to 5 newsgroups and should consider fewer. The same poster started another thread in 9 newsgroups. This is unlikely to be productive. Some knowledgeable people would ignore the posting on that basis. They are a LOT better than corresponding multi-postings.] [quoted text, click to view] >I could of course, but the problem is like this: I have let's say a >binary that uses common code from other libraries, like some header >files, so would be hard to know when to change the version number ... >There are many developers working on the same header files, so hard to >check if something has changed in order to change the version number.
If you use a project file (Microsoft's term for Makefile) appropriately, your product will be rebuilt if and only if a contributing component changes. Version control systems can help in organising this. Your problem is in a class which is not reasonably soluble with the sort of technique you hope to apply. If I wanted to solve your problem, I would find or write a PE dumper - I can propose no suitable URL - and then compare files with boring things filtered from the comparison. Hopefully, this will work. I usually take the line that files with different dates or sizes are different. This is a fairly conservative approach. It is highly likely that the "same" thing can not be built on my machine and yours or even twice on mine. The same river can not be viewed twice. ;) --
Don't see what you're looking for? Try a search.
|