Produce deterministic coff files.

llvm-svn: 196341
This commit is contained in:
Rafael Espindola 2013-12-04 02:02:55 +00:00
parent 94d08ca0e8
commit f394b917ee
2 changed files with 6 additions and 1 deletions

View File

@ -845,7 +845,8 @@ void WinCOFFObjectWriter::WriteObject(MCAssembler &Asm,
Header.PointerToSymbolTable = offset;
Header.TimeDateStamp = sys::TimeValue::now().toEpochTime();
// We want a deterministic output. It looks like GUN as also writes 0 in here.
Header.TimeDateStamp = 0;
// Write it all to disk...
WriteFileHeader(Header);

4
test/MC/COFF/timestamp.s Normal file
View File

@ -0,0 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | llvm-readobj -h | FileCheck %s
// CHECK: ImageFileHeader {
// CHECK: TimeDateStamp: {{.*}} (0x0)