There is a field named checksum in PE, in order to check file whether be corrupted. Sometimes, VisualStudio will defaultly send this option, RELEASE, to lld. So, a error will be raised
lld-link : error : could not open '/RELEASE': no such file or directory
The general idea is to generate the binary and then recalculate the checksum before outputting it.
I am a little surprised that we don't have a function for calculating this checksum already. We are not duplicating code with this?