[PATCH] D44184: Write DWARF data into WASM object file
Derek Schuff via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 5 16:20:19 PDT 2018
dschuff added inline comments.
================
Comment at: lib/DebugInfo/DWARF/DWARFContext.cpp:1146
+ if (uint64_t SectionLoadAddress = L->getSectionLoadAddress(*RSec)) {
+ dbgs() << Ret.Address << "---" << SectionLoadAddress << " " << RSec->getAddress() << "\n";
Ret.Address += SectionLoadAddress - RSec->getAddress();
----------------
Debug print should go back out or go behind `DEBUG()`
================
Comment at: lib/MC/WasmObjectWriter.cpp:52
+ // Where the section header ends (without custom section name).
+ uint64_t PayloadOffset;
+ // Where the contents of the section starts.
----------------
If we always reserve 5 bytes for the section size, couldn't the payload offset always be size offset + 5? We don't rewrite those in MC, right?
================
Comment at: lib/MC/WasmObjectWriter.cpp:139
+ const MCSymbolWasm *Sym;
+ const MCSection* Section;
+
----------------
`MCSection *Section` (here and 141)
Repository:
rL LLVM
https://reviews.llvm.org/D44184
More information about the llvm-commits
mailing list