[PATCH] D50424: [WebAssembly] Group rodata into a single output segment

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 8 11:02:41 PDT 2018


sbc100 added a comment.

I think you are right about the optimized builds.    One thing I thought we might want to preserve is that data objects from the same section should be grouped together contiguously.. but I think we can probably do that while at the same time putting it all in a single segment.

Also, we have post-linking tools such as wasm-opt in binaryen which will actually split up the data segments into smaller ones if they contain runs of zeros.  I'm not sure about doing this in the general case since its not clear to me we can rely on the memory we are passed being zero-initialized.  In general wasm memory are zero intialized, but the embedding code and reuse/modify memory before wasm init time.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D50424





More information about the llvm-commits mailing list