summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/WasmObjectWriter.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 6ec93246c06..7ed20d32fd2 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -102,7 +102,6 @@ struct WasmFunctionTypeDenseMapInfo {
// wasm data segment.
struct WasmDataSegment {
MCSectionWasm *Section;
- StringRef Name;
uint32_t Offset;
SmallVector<char, 4> Data;
};
@@ -280,8 +279,7 @@ private:
uint32_t NumFuncImports);
void writeCodeRelocSection();
void writeDataRelocSection();
- void writeLinkingMetaDataSection(ArrayRef<WasmDataSegment> Segments,
- uint32_t DataSize, uint32_t DataAlignment,
+ void writeLinkingMetaDataSection(uint32_t DataSize, uint32_t DataAlignment,
ArrayRef<StringRef> WeakSymbols,
bool HasStackPointer,
uint32_t StackPointerGlobal);
@@ -913,8 +911,7 @@ void WasmObjectWriter::writeDataRelocSection() {
}
void WasmObjectWriter::writeLinkingMetaDataSection(
- ArrayRef<WasmDataSegment> Segments, uint32_t DataSize,
- uint32_t DataAlignment, ArrayRef<StringRef> WeakSymbols,
+ uint32_t DataSize, uint32_t DataAlignment, ArrayRef<StringRef> WeakSymbols,
bool HasStackPointer, uint32_t StackPointerGlobal) {
SectionBookkeeping Section;
startSection(Section, wasm::WASM_SEC_CUSTOM, "linking");
@@ -946,14 +943,6 @@ void WasmObjectWriter::writeLinkingMetaDataSection(
endSection(SubSection);
}
- if (Segments.size()) {
- startSection(SubSection, wasm::WASM_SEGMENT_NAMES);
- encodeULEB128(Segments.size(), getStream());
- for (const WasmDataSegment &Segment : Segments)
- writeString(Segment.Name);
- endSection(SubSection);
- }
-
endSection(Section);
}
@@ -1140,7 +1129,6 @@ void WasmObjectWriter::writeObject(MCAssembler &Asm,
DataSize = alignTo(DataSize, Section.getAlignment());
DataSegments.emplace_back();
WasmDataSegment &Segment = DataSegments.back();
- Segment.Name = Section.getSectionName();
Segment.Offset = DataSize;
Segment.Section = &Section;
addData(Segment.Data, Section, DataAlignment);
@@ -1300,8 +1288,7 @@ void WasmObjectWriter::writeObject(MCAssembler &Asm,
writeNameSection(Functions, Imports, NumFuncImports);
writeCodeRelocSection();
writeDataRelocSection();
- writeLinkingMetaDataSection(DataSegments, DataSize, DataAlignment,
- WeakSymbols, HasStackPointer, StackPointerGlobal);
+ writeLinkingMetaDataSection(DataSize, DataAlignment, WeakSymbols, HasStackPointer, StackPointerGlobal);
// TODO: Translate the .comment section to the output.
// TODO: Translate debug sections to the output.
OpenPOWER on IntegriCloud