[PATCH] D139184: [LLD][Windows]Feature "checksum" for Windows PE

Qfrost via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 2 02:51:01 PST 2022


Qfrost911 created this revision.
Qfrost911 added reviewers: thieta, aaron.ballman, pengfei, rnk, hans.
Herald added a project: All.
Qfrost911 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

There is a field named  checksum <https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#checksum> in PE, in order to check file whether be corrupted. Sometimes, VisualStudio will defaultly send this option, RELEASE <https://learn.microsoft.com/en-us/cpp/build/reference/release-set-the-checksum?view=msvc-170>, 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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139184

Files:
  lld/COFF/Config.h
  lld/COFF/Driver.cpp
  lld/COFF/Options.td
  lld/COFF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139184.479564.patch
Type: text/x-patch
Size: 3796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221202/af1e4be4/attachment.bin>


More information about the llvm-commits mailing list