Lines Matching defs:Section
62 MCSectionWasm *Section;
74 MCSection *Section;
123 MCSectionWasm *Section;
128 WasmCustomSection(StringRef Name, MCSectionWasm *Section)
129 : Name(Name), Section(Section) {}
256 void startSection(SectionBookkeeping &Section, unsigned SectionId);
257 void startCustomSection(SectionBookkeeping &Section, StringRef Name);
258 void endSection(SectionBookkeeping &Section);
366 void WasmObjectWriter::startSection(SectionBookkeeping &Section,
371 Section.SizeOffset = W->OS.tell();
378 Section.ContentsOffset = W->OS.tell();
379 Section.PayloadOffset = W->OS.tell();
380 Section.Index = SectionCount++;
405 void WasmObjectWriter::startCustomSection(SectionBookkeeping &Section,
408 startSection(Section, wasm::WASM_SEC_CUSTOM);
411 Section.PayloadOffset = W->OS.tell();
422 Section.ContentsOffset = W->OS.tell();
427 void WasmObjectWriter::endSection(SectionBookkeeping &Section) {
434 Size -= Section.PayloadOffset;
443 Section.SizeOffset);
682 const auto &Section =
684 return Section.getSectionOffset() + RelEntry.Addend;
824 SectionBookkeeping Section;
825 startSection(Section, wasm::WASM_SEC_TYPE);
839 endSection(Section);
850 SectionBookkeeping Section;
851 startSection(Section, wasm::WASM_SEC_IMPORT);
885 endSection(Section);
892 SectionBookkeeping Section;
893 startSection(Section, wasm::WASM_SEC_FUNCTION);
899 endSection(Section);
906 SectionBookkeeping Section;
907 startSection(Section, wasm::WASM_SEC_TAG);
915 endSection(Section);
922 SectionBookkeeping Section;
923 startSection(Section, wasm::WASM_SEC_GLOBAL);
956 endSection(Section);
963 SectionBookkeeping Section;
964 startSection(Section, wasm::WASM_SEC_TABLE);
976 endSection(Section);
983 SectionBookkeeping Section;
984 startSection(Section, wasm::WASM_SEC_EXPORT);
993 endSection(Section);
1003 SectionBookkeeping Section;
1004 startSection(Section, wasm::WASM_SEC_ELEM);
1034 endSection(Section);
1041 SectionBookkeeping Section;
1042 startSection(Section, wasm::WASM_SEC_DATACOUNT);
1044 endSection(Section);
1052 SectionBookkeeping Section;
1053 startSection(Section, wasm::WASM_SEC_CODE);
1058 auto *FuncSection = static_cast<MCSectionWasm *>(Func.Section);
1062 FuncSection->setSectionOffset(W->OS.tell() - Section.ContentsOffset);
1067 applyRelocations(CodeRelocations, Section.ContentsOffset, Asm);
1069 endSection(Section);
1070 return Section.Index;
1077 SectionBookkeeping Section;
1078 startSection(Section, wasm::WASM_SEC_DATA);
1093 Segment.Section->setSectionOffset(W->OS.tell() - Section.ContentsOffset);
1098 applyRelocations(DataRelocations, Section.ContentsOffset, Asm);
1100 endSection(Section);
1101 return Section.Index;
1124 SectionBookkeeping Section;
1125 startCustomSection(Section, std::string("reloc.") + Name.str());
1141 endSection(Section);
1146 auto &Relocations = CustomSectionsRelocations[Sec.Section];
1155 SectionBookkeeping Section;
1156 startCustomSection(Section, "linking");
1233 endSection(Section);
1238 SectionBookkeeping Section;
1239 auto *Sec = CustomSection.Section;
1240 startCustomSection(Section, CustomSection.Name);
1242 Sec->setSectionOffset(W->OS.tell() - Section.ContentsOffset);
1245 CustomSection.OutputContentsOffset = Section.ContentsOffset;
1246 CustomSection.OutputIndex = Section.Index;
1248 endSection(Section);
1251 auto &Relocations = CustomSectionsRelocations[CustomSection.Section];
1327 static bool isSectionReferenced(MCAssembler &Asm, MCSectionWasm &Section) {
1328 StringRef SectionName = Section.getName();
1488 auto &Section = static_cast<MCSectionWasm &>(Sec);
1489 StringRef SectionName = Section.getName();
1496 LLVM_DEBUG(dbgs() << "Processing Section " << SectionName << " group "
1497 << Section.getGroup() << "\n";);
1502 !isSectionReferenced(Asm, Section))
1506 if (Section.isText())
1509 if (Section.isWasmData()) {
1511 DataSize = alignTo(DataSize, Section.getAlign());
1515 Segment.InitFlags = Section.getPassive()
1519 Segment.Section = &Section;
1520 addData(Segment.Data, Section);
1521 Segment.Alignment = Log2(Section.getAlign());
1522 Segment.LinkingFlags = Section.getSegmentFlags();
1524 Section.setSegmentIndex(SegmentIndex);
1526 if (const MCSymbolWasm *C = Section.getGroup()) {
1532 assert(Section.isMetadata());
1547 ProducersSection = std::make_unique<WasmCustomSection>(Name, &Section);
1552 std::make_unique<WasmCustomSection>(Name, &Section);
1560 if (const MCSymbolWasm *C = Section.getGroup()) {
1566 CustomSections.emplace_back(Name, &Section);
1604 Func.Section = &WS.getSection();
1609 auto &Section = static_cast<MCSectionWasm &>(WS.getSection());
1610 if (const MCSymbolWasm *C = Section.getGroup()) {