This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] add memory map file support for wasm-ld
Changes PlannedPublic

Authored by quantum on Jun 3 2019, 4:49 PM.

Details

Summary

Add the option to generate a memory map file showing the memory location
of all external global variables.

Event Timeline

quantum created this revision.Jun 3 2019, 4:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2019, 4:49 PM

This would require a test before it is merged.

lld/wasm/MapFile.cpp
18

It might be good to give the hex values an 0x prefix

quantum planned changes to this revision.Jun 3 2019, 5:56 PM
ruiu added a subscriber: ruiu.Jun 3 2019, 6:22 PM

I'd rename this patch to avoid "memory map file" because that term is overloaded and can be interpreted in a different way. I'd say implementing -print-map.

lld/wasm/MapFile.cpp
14

This format is different from lld/ELF. I think we have a column for input files, input sections and output sections. Is this an intentional change?