summaryrefslogtreecommitdiff
path: root/src/binary-writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/binary-writer.cc')
-rw-r--r--src/binary-writer.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/binary-writer.cc b/src/binary-writer.cc
index b8fa1702..b6c33ccc 100644
--- a/src/binary-writer.cc
+++ b/src/binary-writer.cc
@@ -993,6 +993,12 @@ Result BinaryWriter::WriteModule() {
EndSection();
}
+ if (options_.features.bulk_memory_enabled()) {
+ BeginKnownSection(BinarySection::DataCount);
+ WriteU32Leb128(stream_, module_->data_segments.size(), "data count");
+ EndSection();
+ }
+
if (num_funcs) {
BeginKnownSection(BinarySection::Code);
WriteU32Leb128(stream_, num_funcs, "num functions");