[WebAssembly] Emit the DataCount section when bulk memory is enabled
authorThomas Lively <tlively@google.com>
Fri, 19 Apr 2019 23:40:36 +0000 (23:40 +0000)
committerThomas Lively <tlively@google.com>
Fri, 19 Apr 2019 23:40:36 +0000 (23:40 +0000)
commit84771e2d21e82fab54bbc463b7c3d31402b62a3c
tree980f3cec65fa58dd2b2b0d88a6d0c60d19a40f80
parent85e0ff752ca7aa15b7b429d4dbb62d9592570cc5
[WebAssembly] Emit the DataCount section when bulk memory is enabled

Summary:
The DataCount section is necessary for the bulk memory operations
memory.init and data.drop to validate, but it is not recognized by
engines that do not support bulk memory, so emit the section only if
bulk-memory is enabled.

Reviewers: aheejin, dschuff, sbc100

Subscribers: jgravelle-google, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60637

llvm-svn: 358798
lld/test/wasm/data-segment-merging.ll
lld/wasm/OutputSections.cpp
lld/wasm/Writer.cpp