This is stepping stone towards honoring -fdata-sections
and letting the assembler decide how many wasm data
segments to create.
This behaviour is also closer to what s2wasm currently does.
Paths
| Differential D37834
[WebAssembly] Use a separate wasm data segment for each global symbol ClosedPublic Authored by sbc100 on Sep 13 2017, 4:30 PM.
Details Summary This is stepping stone towards honoring -fdata-sections This behaviour is also closer to what s2wasm currently does.
Diff Detail
Event TimelineHerald added subscribers: aheejin, jgravelle-google, dschuff, jfb. · View Herald TranscriptSep 13 2017, 4:30 PM
sbc100 marked 2 inline comments as done. Comment Actions
dschuff added inline comments. This revision is now accepted and ready to land.Sep 14 2017, 3:34 PM sbc100 retitled this revision from [WebAssembly] Use a seperate wasm data segment for each global symbol to [WebAssembly] Use a separate wasm data segment for each global symbol.Sep 14 2017, 4:03 PM Closed by commit rL313313: [WebAssembly] Use a separate wasm data segment for each global symbol (authored by sbc). · Explain WhySep 14 2017, 4:09 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 115135 lib/MC/WasmObjectWriter.cpp
test/MC/WebAssembly/external-data.ll
test/MC/WebAssembly/reloc-data.ll
test/MC/WebAssembly/unnamed-data.ll
test/tools/llvm-objdump/WebAssembly/relocations.test
|
Might be worth putting a comment here (or somewhere) mentioning that because wasm binaries have only one real data section (which is allocated/mapped over the whole memory), each segment has to track its "virtual" section/subsection/whatever we want to call it.