[PATCH] D62834: [WebAssembly] make wasm-ld --verbose show data section startVA and name

Guanzhong Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 17:21:33 PDT 2019


quantum created this revision.
quantum added reviewers: tlively, aheejin, sbc100.
Herald added subscribers: llvm-commits, sunfish, jgravelle-google, dschuff.
Herald added a project: LLVM.

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`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62834

Files:
  lld/wasm/OutputSections.cpp


Index: lld/wasm/OutputSections.cpp
===================================================================
--- lld/wasm/OutputSections.cpp
+++ lld/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() +


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62834.202829.patch
Type: text/x-patch
Size: 630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190604/659457d2/attachment.bin>


More information about the llvm-commits mailing list