llvm-readobj: zero out timestamp in COFF auto-generated test files.

The timestamp meant these files changed with each invocation of
relocs.py, confusing matters when we add relocations and need to
update the tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215350 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Northover 2014-08-11 09:53:07 +00:00
parent 835cfaa11b
commit f34a60c920
3 changed files with 4 additions and 0 deletions

View File

@ -327,6 +327,10 @@ def patchCoff(path, relocs):
machine_type = f.uint16()
section_count = f.uint16()
# Zero out timestamp to prevent churn when regenerating COFF files.
f.writeUInt32(0)
f.seek(20)
sections = [CoffSection(f) for idx in range(section_count)]