[PATCH] D112667: [lld][WebAssembly] Initialize bss segments using memory.fill

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 27 15:15:12 PDT 2021


sbc100 created this revision.
Herald added subscribers: wingo, ecnelises, sunfish, jgravelle-google, dschuff.
sbc100 requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

Previously we were relying on the dynamic loader to take care of this
but it simple and correct for us to do it here instead.

Now we initialize bss segments as part of `__wasm_init_memory` at the
same time we initialize passive segments.

In addition we extent the us of `__wasm_init_memory` outside of shared
memory situations.  Specifically it is now used to initialize bss
segments when the memory is imported.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112667

Files:
  lld/test/wasm/custom-section-name.ll
  lld/test/wasm/data-segments.ll
  lld/test/wasm/shared-memory-bss.s
  lld/test/wasm/tls.s
  lld/wasm/Writer.cpp
  llvm/include/llvm/BinaryFormat/Wasm.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112667.382814.patch
Type: text/x-patch
Size: 17651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211027/4d2bde7e/attachment.bin>


More information about the llvm-commits mailing list