[PATCH] D41263: Fix size computation in WindowsResourceCOFFWriter::performFileLayout()
Bob Haarman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 14 17:26:31 PST 2017
inglorion added inline comments.
================
Comment at: llvm/lib/Object/WindowsResource.cpp:379
+ FileSize += 3 * COFF::Symbol16Size + // @feat.00, .rsrc$1, .rsrc$2
+ 2 * sizeof(coff_aux_section_definition) + // first and second aux section
+ Data.size() * COFF::Symbol16Size + // 1 symbol per resource
----------------
pcc wrote:
> Is this correct? I think the size of an auxiliary symbol is the same as the size of a regular symbol, so this looks like this would produce the same result as before.
You are right; they are both 18 bytes. And just changing the code as I've done here does not actually fix the problem. I had some printstrumentation in there that seems to make the difference between working and broken. This is getting more interesting.
https://reviews.llvm.org/D41263
More information about the llvm-commits
mailing list