[WebAssembly] Remove DataSize from linking metadata section
Neither the linker nor the runtime need this information
anymore. We were originally using this to model BSS size
but the plan is now to use the segment metadata to allow
for BSS segments.
Differential Revision: https://reviews.llvm.org/D41366
llvm-svn: 326267
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 8b32cc4..b1ce2c3 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -274,7 +274,7 @@
void writeCodeRelocSection();
void writeDataRelocSection();
void writeLinkingMetaDataSection(
- uint32_t DataSize, ArrayRef<wasm::WasmSymbolInfo> SymbolInfos,
+ ArrayRef<wasm::WasmSymbolInfo> SymbolInfos,
ArrayRef<std::pair<uint16_t, uint32_t>> InitFuncs,
const std::map<StringRef, std::vector<WasmComdatEntry>> &Comdats);
@@ -862,7 +862,7 @@
}
void WasmObjectWriter::writeLinkingMetaDataSection(
- uint32_t DataSize, ArrayRef<wasm::WasmSymbolInfo> SymbolInfos,
+ ArrayRef<wasm::WasmSymbolInfo> SymbolInfos,
ArrayRef<std::pair<uint16_t, uint32_t>> InitFuncs,
const std::map<StringRef, std::vector<WasmComdatEntry>> &Comdats) {
SectionBookkeeping Section;
@@ -897,12 +897,6 @@
endSection(SubSection);
}
- if (DataSize > 0) {
- startSection(SubSection, wasm::WASM_DATA_SIZE);
- encodeULEB128(DataSize, getStream());
- endSection(SubSection);
- }
-
if (DataSegments.size()) {
startSection(SubSection, wasm::WASM_SEGMENT_INFO);
encodeULEB128(DataSegments.size(), getStream());
@@ -1316,7 +1310,7 @@
writeDataSection();
writeCodeRelocSection();
writeDataRelocSection();
- writeLinkingMetaDataSection(DataSize, SymbolInfos, InitFuncs, Comdats);
+ writeLinkingMetaDataSection(SymbolInfos, InitFuncs, Comdats);
// TODO: Translate the .comment section to the output.
// TODO: Translate debug sections to the output.