[WebAssembly] make wasm-ld --verbose show data section startVA and name
Summary:
Make `wasm-ld --verbose` show data section start virtual address and name
as well, instead of just showing the size. This makes it much easier to
track which global variable is in which address when used in conjunction
with `--no-merge-data-sections`.
Patch by Guanzhong Chen
Reviewers: tlively, aheejin, sbc100, ruiu
Reviewed By: sbc100, ruiu
Subscribers: ruiu, dschuff, jgravelle-google, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62834
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@362548 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/wasm/OutputSections.cpp b/wasm/OutputSections.cpp
index e33f85f..338c88b 100644
--- a/wasm/OutputSections.cpp
+++ b/wasm/OutputSections.cpp
@@ -151,7 +151,8 @@
Segment->SectionOffset = BodySize;
BodySize += Segment->Header.size() + Segment->Size;
- log("Data segment: size=" + Twine(Segment->Size));
+ log("Data segment: size=" + Twine(Segment->Size) + ", startVA=" +
+ Twine::utohexstr(Segment->StartVA) + ", name=" + Segment->Name);
for (InputSegment *InputSeg : Segment->InputSegments)
InputSeg->OutputOffset = Segment->SectionOffset + Segment->Header.size() +