[PATCH] D77187: [lld][WebAssembly] Add initial support for -Map/--print-map

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 10:47:57 PDT 2020


sbc100 added inline comments.


================
Comment at: lld/test/wasm/map-file.s:27
+// CHECK:    Addr      Off     Size Out     In      Symbol
+// CHECK:       -        8        6 TYPE
+// CHECK:       -        e        5 FUNCTION
----------------
sbc100 wrote:
> ruiu wrote:
> > sbc100 wrote:
> > > ruiu wrote:
> > > > Hmm, what is "Off"? It looks like it is monotonically increasing, but I'm not sure what these numbers are.
> > > These are the offset in the wasm module on disk.
> > Maybe a noob question, but is that significant? For ELF and COFF, we emit an offset within an output section for each input section, but we don't print out an offset within a file.
> It hard to say what the most useful information to present is.   Do you have rational for why `offset within an output section for each input section` is useful?   I happy to modify this PR to display that information instead.  I imagine we could change this based on consumer feedback in the future too.
Ping.

Would you prefer I output "offset with output section for each input section" ?   Looking at `test/ELF/map-file.s` only see `LMA` and `VMA` (which I assume stands for virtual memory address?).    I'm not sure what LMA has a logical correspondence in wasm.  Is this what you call " offset with output section for each input section" ?  For the test code LMA and VMA seems to be the same in all cases.

I'm happy to change this however you like but I also think its find to land as is and get feedback as to what information is the most useful to present.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77187/new/

https://reviews.llvm.org/D77187





More information about the llvm-commits mailing list