Binary Reproducibility in Visual C++

前端 未结 2 538
遥遥无期
遥遥无期 2021-01-12 23:28

Is there a way to force the same code to produce the same binary in Visual C++? Turn off the timestamp in the PE or force the timestamp in the PE to be some fixed value, in

2条回答
  •  孤独总比滥情好
    2021-01-13 00:08

    I suppose you could write a utility to open the PE, set the checksum to 0, set the timestamp to what you like, recompute the crc, then write it back out. It would be nice if there were an official way to ensure perfect binary reproducibility, though.

    For more information: http://msdn.microsoft.com/en-us/magazine/cc301805.aspx

提交回复
热议问题