Lines Matching refs:Section
65 MCSectionWasm *Section; member
126 MCSectionWasm *Section; member
131 WasmCustomSection(StringRef Name, MCSectionWasm *Section) in WasmCustomSection()
132 : Name(Name), Section(Section), OutputContentsOffset(0), in WasmCustomSection()
238 void startSection(SectionBookkeeping &Section, unsigned SectionId);
239 void startCustomSection(SectionBookkeeping &Section, StringRef Name);
240 void endSection(SectionBookkeeping &Section);
348 void WasmObjectWriter::startSection(SectionBookkeeping &Section, in startSection() argument
353 Section.SizeOffset = W->OS.tell(); in startSection()
360 Section.ContentsOffset = W->OS.tell(); in startSection()
361 Section.PayloadOffset = W->OS.tell(); in startSection()
362 Section.Index = SectionCount++; in startSection()
365 void WasmObjectWriter::startCustomSection(SectionBookkeeping &Section, in startCustomSection() argument
368 startSection(Section, wasm::WASM_SEC_CUSTOM); in startCustomSection()
371 Section.PayloadOffset = W->OS.tell(); in startCustomSection()
377 Section.ContentsOffset = W->OS.tell(); in startCustomSection()
382 void WasmObjectWriter::endSection(SectionBookkeeping &Section) { in endSection() argument
389 Size -= Section.PayloadOffset; in endSection()
398 Section.SizeOffset); in endSection()
632 const auto &Section = in getProvisionalValue() local
634 return Section.getSectionOffset() + RelEntry.Addend; in getProvisionalValue()
775 SectionBookkeeping Section; in writeTypeSection() local
776 startSection(Section, wasm::WASM_SEC_TYPE); in writeTypeSection()
790 endSection(Section); in writeTypeSection()
801 SectionBookkeeping Section; in writeImportSection() local
802 startSection(Section, wasm::WASM_SEC_IMPORT); in writeImportSection()
836 endSection(Section); in writeImportSection()
843 SectionBookkeeping Section; in writeFunctionSection() local
844 startSection(Section, wasm::WASM_SEC_FUNCTION); in writeFunctionSection()
850 endSection(Section); in writeFunctionSection()
857 SectionBookkeeping Section; in writeTagSection() local
858 startSection(Section, wasm::WASM_SEC_TAG); in writeTagSection()
866 endSection(Section); in writeTagSection()
873 SectionBookkeeping Section; in writeGlobalSection() local
874 startSection(Section, wasm::WASM_SEC_GLOBAL); in writeGlobalSection()
903 endSection(Section); in writeGlobalSection()
910 SectionBookkeeping Section; in writeTableSection() local
911 startSection(Section, wasm::WASM_SEC_TABLE); in writeTableSection()
921 endSection(Section); in writeTableSection()
928 SectionBookkeeping Section; in writeExportSection() local
929 startSection(Section, wasm::WASM_SEC_EXPORT); in writeExportSection()
938 endSection(Section); in writeExportSection()
948 SectionBookkeeping Section; in writeElemSection() local
949 startSection(Section, wasm::WASM_SEC_ELEM); in writeElemSection()
978 endSection(Section); in writeElemSection()
985 SectionBookkeeping Section; in writeDataCountSection() local
986 startSection(Section, wasm::WASM_SEC_DATACOUNT); in writeDataCountSection()
988 endSection(Section); in writeDataCountSection()
997 SectionBookkeeping Section; in writeCodeSection() local
998 startSection(Section, wasm::WASM_SEC_CODE); in writeCodeSection()
1010 FuncSection.setSectionOffset(W->OS.tell() - Section.ContentsOffset); in writeCodeSection()
1015 applyRelocations(CodeRelocations, Section.ContentsOffset, Layout); in writeCodeSection()
1017 endSection(Section); in writeCodeSection()
1018 return Section.Index; in writeCodeSection()
1025 SectionBookkeeping Section; in writeDataSection() local
1026 startSection(Section, wasm::WASM_SEC_DATA); in writeDataSection()
1041 Segment.Section->setSectionOffset(W->OS.tell() - Section.ContentsOffset); in writeDataSection()
1046 applyRelocations(DataRelocations, Section.ContentsOffset, Layout); in writeDataSection()
1048 endSection(Section); in writeDataSection()
1049 return Section.Index; in writeDataSection()
1072 SectionBookkeeping Section; in writeRelocSection() local
1073 startCustomSection(Section, std::string("reloc.") + Name.str()); in writeRelocSection()
1089 endSection(Section); in writeRelocSection()
1094 auto &Relocations = CustomSectionsRelocations[Sec.Section]; in writeCustomRelocSections()
1103 SectionBookkeeping Section; in writeLinkingMetaDataSection() local
1104 startCustomSection(Section, "linking"); in writeLinkingMetaDataSection()
1181 endSection(Section); in writeLinkingMetaDataSection()
1187 SectionBookkeeping Section; in writeCustomSection() local
1188 auto *Sec = CustomSection.Section; in writeCustomSection()
1189 startCustomSection(Section, CustomSection.Name); in writeCustomSection()
1191 Sec->setSectionOffset(W->OS.tell() - Section.ContentsOffset); in writeCustomSection()
1194 CustomSection.OutputContentsOffset = Section.ContentsOffset; in writeCustomSection()
1195 CustomSection.OutputIndex = Section.Index; in writeCustomSection()
1197 endSection(Section); in writeCustomSection()
1200 auto &Relocations = CustomSectionsRelocations[CustomSection.Section]; in writeCustomSection()
1426 auto &Section = static_cast<MCSectionWasm &>(Sec); in writeOneObject() local
1427 StringRef SectionName = Section.getName(); in writeOneObject()
1435 << Section.getGroup() << "\n";); in writeOneObject()
1442 if (Section.getKind().isText()) in writeOneObject()
1445 if (Section.isWasmData()) { in writeOneObject()
1447 DataSize = alignTo(DataSize, Section.getAlignment()); in writeOneObject()
1451 Segment.InitFlags = Section.getPassive() in writeOneObject()
1455 Segment.Section = &Section; in writeOneObject()
1456 addData(Segment.Data, Section); in writeOneObject()
1457 Segment.Alignment = Log2_32(Section.getAlignment()); in writeOneObject()
1458 Segment.LinkingFlags = Section.getSegmentFlags(); in writeOneObject()
1460 Section.setSegmentIndex(SegmentIndex); in writeOneObject()
1462 if (const MCSymbolWasm *C = Section.getGroup()) { in writeOneObject()
1484 ProducersSection = std::make_unique<WasmCustomSection>(Name, &Section); in writeOneObject()
1489 std::make_unique<WasmCustomSection>(Name, &Section); in writeOneObject()
1497 if (const MCSymbolWasm *C = Section.getGroup()) { in writeOneObject()
1503 CustomSections.emplace_back(Name, &Section); in writeOneObject()
1550 auto &Section = static_cast<MCSectionWasm &>(WS.getSection()); in writeOneObject() local
1551 if (const MCSymbolWasm *C = Section.getGroup()) { in writeOneObject()