Hacker News new | ask | show | jobs
by ddfs 3487 days ago
Windows compilers aren't deterministic in some areas.

Roslyn already has a switch to do this, /deterministic.

There is a spec for this though, https://www.microsoft.com/en-us/download/confirmation.aspx?i...

> A stamp that is used for different purposes in several places in a PE or COFF file. In most cases, the format of each stamp is the same as that used by the time functions in the C run-time library. For exceptions, see the descripton of IMAGE_DEBUG_TYPE_REPRO (section 6.1.2). If the stamp value is 0 or 0xFFFFFFFF, it does not represent a real or meaningful date/time stamp.

and

> The presence of an entry of type IMAGE_DEBUG_TYPE_REPRO indicates the PE file is built in a way to achieve determinism or reproducibility. If the input does not change, the output PE file is guaranteed to be bit-for-bit identical no matter when or where the PE is produced. Various date/time stamp fields in the PE file are filled with part or all the bits from a calculated hash value that uses PE file content as input, and therefore no longer represent the actual date and time when a PE file or related specific data within the PE is produced. The raw data of this debug entry may be empty, or may contain a calculated hash value preceded by a four-byte value that represents the hash value length.

1 comments

unless the key to reproducible builds is hidden somewhere inside "How to Implement Compatible IDs in Printing Devices", that link may be wrong
hit download and it pops up a window where you can select the correct doc.

It's PECoff.docx