diff options
Diffstat (limited to 'lld/wasm/OutputSections.cpp')
-rw-r--r-- | lld/wasm/OutputSections.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/wasm/OutputSections.cpp b/lld/wasm/OutputSections.cpp index 05d5ddaac7a..256a9884f94 100644 --- a/lld/wasm/OutputSections.cpp +++ b/lld/wasm/OutputSections.cpp @@ -85,8 +85,9 @@ CodeSection::CodeSection(ArrayRef<InputFunction *> Functions) OS.flush(); BodySize = CodeSectionHeader.size(); - for (InputChunk *Func : Functions) { + for (InputFunction *Func : Functions) { Func->OutputOffset = BodySize; + Func->calculateSize(); BodySize += Func->getSize(); } |