]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: always set timestamp in PE header to 0
authorShenghou Ma <minux@golang.org>
Mon, 2 Feb 2015 23:53:24 +0000 (18:53 -0500)
committerMinux Ma <minux@golang.org>
Thu, 5 Feb 2015 02:45:03 +0000 (02:45 +0000)
Fixes #9756.

Change-Id: If4ee6fe10f8f90294ff9c5e7480371494094b111
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/3740
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
doc/go1.5.txt
src/cmd/ld/pe.c

index f1b443417dd28d0bad7f926931e8b83ce4fba067..f45ca068de8476d82f8f830af03c49d0ddf6680d 100644 (file)
@@ -19,6 +19,7 @@ testing/quick: support generation of arrays (https://golang.org/cl/3865)
 Tools:
 
 cmd/vet: better validation of struct tags (https://golang.org/cl/2685)
+cmd/ld: no longer record build timestamp in Windows PE file header (https://golang.org/cl/3740)
 
 Performance:
 
index c26cd5264a51727b4dc9f7771bfc936fe7959b15..e45beb62b5a2ccf7b263b324e321d51b31b92db9 100644 (file)
@@ -646,7 +646,9 @@ asmbpe(void)
        addpersrc();
 
        fh.NumberOfSections = nsect;
-       fh.TimeDateStamp = time(0);
+       // Being able to produce identical output for identical input is
+       // much more beneficial than having build timestamp in the header.
+       fh.TimeDateStamp = 0;
        fh.Characteristics = IMAGE_FILE_RELOCS_STRIPPED|
                IMAGE_FILE_EXECUTABLE_IMAGE|IMAGE_FILE_DEBUG_STRIPPED;
        if (pe64) {