Lines Matching refs:Section
63 MCSectionWasm *Section; member
75 MCSection *Section; member
124 MCSectionWasm *Section; member
129 WasmCustomSection(StringRef Name, MCSectionWasm *Section) in WasmCustomSection()
130 : Name(Name), Section(Section) {} in WasmCustomSection()
257 void startSection(SectionBookkeeping &Section, unsigned SectionId);
258 void startCustomSection(SectionBookkeeping &Section, StringRef Name);
259 void endSection(SectionBookkeeping &Section);
369 void WasmObjectWriter::startSection(SectionBookkeeping &Section, in startSection() argument
374 Section.SizeOffset = W->OS.tell(); in startSection()
381 Section.ContentsOffset = W->OS.tell(); in startSection()
382 Section.PayloadOffset = W->OS.tell(); in startSection()
383 Section.Index = SectionCount++; in startSection()
408 void WasmObjectWriter::startCustomSection(SectionBookkeeping &Section, in startCustomSection() argument
411 startSection(Section, wasm::WASM_SEC_CUSTOM); in startCustomSection()
414 Section.PayloadOffset = W->OS.tell(); in startCustomSection()
425 Section.ContentsOffset = W->OS.tell(); in startCustomSection()
430 void WasmObjectWriter::endSection(SectionBookkeeping &Section) { in endSection() argument
437 Size -= Section.PayloadOffset; in endSection()
446 Section.SizeOffset); in endSection()
687 const auto &Section = in getProvisionalValue() local
689 return Section.getSectionOffset() + RelEntry.Addend; in getProvisionalValue()
831 SectionBookkeeping Section; in writeTypeSection() local
832 startSection(Section, wasm::WASM_SEC_TYPE); in writeTypeSection()
846 endSection(Section); in writeTypeSection()
857 SectionBookkeeping Section; in writeImportSection() local
858 startSection(Section, wasm::WASM_SEC_IMPORT); in writeImportSection()
892 endSection(Section); in writeImportSection()
899 SectionBookkeeping Section; in writeFunctionSection() local
900 startSection(Section, wasm::WASM_SEC_FUNCTION); in writeFunctionSection()
906 endSection(Section); in writeFunctionSection()
913 SectionBookkeeping Section; in writeTagSection() local
914 startSection(Section, wasm::WASM_SEC_TAG); in writeTagSection()
922 endSection(Section); in writeTagSection()
929 SectionBookkeeping Section; in writeGlobalSection() local
930 startSection(Section, wasm::WASM_SEC_GLOBAL); in writeGlobalSection()
963 endSection(Section); in writeGlobalSection()
970 SectionBookkeeping Section; in writeTableSection() local
971 startSection(Section, wasm::WASM_SEC_TABLE); in writeTableSection()
981 endSection(Section); in writeTableSection()
988 SectionBookkeeping Section; in writeExportSection() local
989 startSection(Section, wasm::WASM_SEC_EXPORT); in writeExportSection()
998 endSection(Section); in writeExportSection()
1008 SectionBookkeeping Section; in writeElemSection() local
1009 startSection(Section, wasm::WASM_SEC_ELEM); in writeElemSection()
1038 endSection(Section); in writeElemSection()
1045 SectionBookkeeping Section; in writeDataCountSection() local
1046 startSection(Section, wasm::WASM_SEC_DATACOUNT); in writeDataCountSection()
1048 endSection(Section); in writeDataCountSection()
1057 SectionBookkeeping Section; in writeCodeSection() local
1058 startSection(Section, wasm::WASM_SEC_CODE); in writeCodeSection()
1063 auto *FuncSection = static_cast<MCSectionWasm *>(Func.Section); in writeCodeSection()
1067 FuncSection->setSectionOffset(W->OS.tell() - Section.ContentsOffset); in writeCodeSection()
1072 applyRelocations(CodeRelocations, Section.ContentsOffset, Layout); in writeCodeSection()
1074 endSection(Section); in writeCodeSection()
1075 return Section.Index; in writeCodeSection()
1082 SectionBookkeeping Section; in writeDataSection() local
1083 startSection(Section, wasm::WASM_SEC_DATA); in writeDataSection()
1098 Segment.Section->setSectionOffset(W->OS.tell() - Section.ContentsOffset); in writeDataSection()
1103 applyRelocations(DataRelocations, Section.ContentsOffset, Layout); in writeDataSection()
1105 endSection(Section); in writeDataSection()
1106 return Section.Index; in writeDataSection()
1129 SectionBookkeeping Section; in writeRelocSection() local
1130 startCustomSection(Section, std::string("reloc.") + Name.str()); in writeRelocSection()
1146 endSection(Section); in writeRelocSection()
1151 auto &Relocations = CustomSectionsRelocations[Sec.Section]; in writeCustomRelocSections()
1160 SectionBookkeeping Section; in writeLinkingMetaDataSection() local
1161 startCustomSection(Section, "linking"); in writeLinkingMetaDataSection()
1238 endSection(Section); in writeLinkingMetaDataSection()
1244 SectionBookkeeping Section; in writeCustomSection() local
1245 auto *Sec = CustomSection.Section; in writeCustomSection()
1246 startCustomSection(Section, CustomSection.Name); in writeCustomSection()
1248 Sec->setSectionOffset(W->OS.tell() - Section.ContentsOffset); in writeCustomSection()
1251 CustomSection.OutputContentsOffset = Section.ContentsOffset; in writeCustomSection()
1252 CustomSection.OutputIndex = Section.Index; in writeCustomSection()
1254 endSection(Section); in writeCustomSection()
1257 auto &Relocations = CustomSectionsRelocations[CustomSection.Section]; in writeCustomSection()
1482 auto &Section = static_cast<MCSectionWasm &>(Sec); in writeOneObject() local
1483 StringRef SectionName = Section.getName(); in writeOneObject()
1491 << Section.getGroup() << "\n";); in writeOneObject()
1498 if (Section.getKind().isText()) in writeOneObject()
1501 if (Section.isWasmData()) { in writeOneObject()
1503 DataSize = alignTo(DataSize, Section.getAlign()); in writeOneObject()
1507 Segment.InitFlags = Section.getPassive() in writeOneObject()
1511 Segment.Section = &Section; in writeOneObject()
1512 addData(Segment.Data, Section); in writeOneObject()
1513 Segment.Alignment = Log2(Section.getAlign()); in writeOneObject()
1514 Segment.LinkingFlags = Section.getSegmentFlags(); in writeOneObject()
1516 Section.setSegmentIndex(SegmentIndex); in writeOneObject()
1518 if (const MCSymbolWasm *C = Section.getGroup()) { in writeOneObject()
1539 ProducersSection = std::make_unique<WasmCustomSection>(Name, &Section); in writeOneObject()
1544 std::make_unique<WasmCustomSection>(Name, &Section); in writeOneObject()
1552 if (const MCSymbolWasm *C = Section.getGroup()) { in writeOneObject()
1558 CustomSections.emplace_back(Name, &Section); in writeOneObject()
1596 Func.Section = &WS.getSection(); in writeOneObject()
1601 auto &Section = static_cast<MCSectionWasm &>(WS.getSection()); in writeOneObject() local
1602 if (const MCSymbolWasm *C = Section.getGroup()) { in writeOneObject()