Visual C ++中的二进制可再现性 [英] Binary Reproducibility in Visual C++

查看:105
本文介绍了Visual C ++中的二进制可再现性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以在Visual C ++中强制相同的代码生成相同的二进制文件?关闭PE中的时间戳或强制PE中的时间戳为某个固定值,换句话说?

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 other words?

推荐答案

我想您可以编写一个实用程序来打开PE,将校验和设置为0,将时间戳设置为所需的值,重新计算crc,然后编写退出.不过,如果有一种官方的方法来确保完美的二进制再现性,那将是很好的.

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.

有关更多信息: http://msdn.microsoft.com/en-us/magazine/cc301805. aspx

这篇关于Visual C ++中的二进制可再现性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆