[PATCH] D45273: COFF: Move .rsrc to the end of the list of non-discardable sections.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 4 10:54:29 PDT 2018
pcc created this revision.
pcc added reviewers: ruiu, hans, thakis, rnk, inglorion.
The Win32 UpdateResource function can change the contents of .rsrc. It
will move the sections that come after, but if any of those sections
contain references to sections before .rsrc or vice versa (such as
call or PC-relative lea instructions), or if references to those
sections appear in the PE header (such as the entry point), those
references will break. This was found by a test in Chromium.
https://reviews.llvm.org/D45273
Files:
lld/COFF/Writer.cpp
lld/test/COFF/combined-resources.test
lld/test/COFF/manifestinput.test
lld/test/COFF/resource.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45273.140995.patch
Type: text/x-patch
Size: 6416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180404/2ec699f8/attachment.bin>
More information about the llvm-commits
mailing list