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;
826 SectionBookkeeping Section;
827 startSection(Section, wasm::WASM_SEC_TYPE);
841 endSection(Section);
852 SectionBookkeeping Section;
853 startSection(Section, wasm::WASM_SEC_IMPORT);
887 endSection(Section);
894 SectionBookkeeping Section;
895 startSection(Section, wasm::WASM_SEC_FUNCTION);
901 endSection(Section);
908 SectionBookkeeping Section;
909 startSection(Section, wasm::WASM_SEC_TAG);
917 endSection(Section);
924 SectionBookkeeping Section;
925 startSection(Section, wasm::WASM_SEC_GLOBAL);
958 endSection(Section);
965 SectionBookkeeping Section;
966 startSection(Section, wasm::WASM_SEC_TABLE);
978 endSection(Section);
985 SectionBookkeeping Section;
986 startSection(Section, wasm::WASM_SEC_EXPORT);
995 endSection(Section);
1005 SectionBookkeeping Section;
1006 startSection(Section, wasm::WASM_SEC_ELEM);
1036 endSection(Section);
1043 SectionBookkeeping Section;
1044 startSection(Section, wasm::WASM_SEC_DATACOUNT);
1046 endSection(Section);
1054 SectionBookkeeping Section;
1055 startSection(Section, wasm::WASM_SEC_CODE);
1060 auto *FuncSection = static_cast<MCSectionWasm *>(Func.Section);
1064 FuncSection->setSectionOffset(W->OS.tell() - Section.ContentsOffset);
1069 applyRelocations(CodeRelocations, Section.ContentsOffset, Asm);
1071 endSection(Section);
1072 return Section.Index;
1079 SectionBookkeeping Section;
1080 startSection(Section, wasm::WASM_SEC_DATA);
1095 Segment.Section->setSectionOffset(W->OS.tell() - Section.ContentsOffset);
1100 applyRelocations(DataRelocations, Section.ContentsOffset, Asm);
1102 endSection(Section);
1103 return Section.Index;
1126 SectionBookkeeping Section;
1127 startCustomSection(Section, std::string("reloc.") + Name.str());
1143 endSection(Section);
1148 auto &Relocations = CustomSectionsRelocations[Sec.Section];
1157 SectionBookkeeping Section;
1158 startCustomSection(Section, "linking");
1235 endSection(Section);
1240 SectionBookkeeping Section;
1241 auto *Sec = CustomSection.Section;
1242 startCustomSection(Section, CustomSection.Name);
1244 Sec->setSectionOffset(W->OS.tell() - Section.ContentsOffset);
1247 CustomSection.OutputContentsOffset = Section.ContentsOffset;
1248 CustomSection.OutputIndex = Section.Index;
1250 endSection(Section);
1253 auto &Relocations = CustomSectionsRelocations[CustomSection.Section];
1329 static bool isSectionReferenced(MCAssembler &Asm, MCSectionWasm &Section) {
1330 StringRef SectionName = Section.getName();
1490 auto &Section = static_cast<MCSectionWasm &>(Sec);
1491 StringRef SectionName = Section.getName();
1498 LLVM_DEBUG(dbgs() << "Processing Section " << SectionName << " group "
1499 << Section.getGroup() << "\n";);
1504 !isSectionReferenced(Asm, Section))
1508 if (Section.isText())
1511 if (Section.isWasmData()) {
1513 DataSize = alignTo(DataSize, Section.getAlign());
1517 Segment.InitFlags = Section.getPassive()
1521 Segment.Section = &Section;
1522 addData(Segment.Data, Section);
1523 Segment.Alignment = Log2(Section.getAlign());
1524 Segment.LinkingFlags = Section.getSegmentFlags();
1526 Section.setSegmentIndex(SegmentIndex);
1528 if (const MCSymbolWasm *C = Section.getGroup()) {
1534 assert(Section.isMetadata());
1549 ProducersSection = std::make_unique<WasmCustomSection>(Name, &Section);
1554 std::make_unique<WasmCustomSection>(Name, &Section);
1562 if (const MCSymbolWasm *C = Section.getGroup()) {
1568 CustomSections.emplace_back(Name, &Section);
1606 Func.Section = &WS.getSection();
1611 auto &Section = static_cast<MCSectionWasm &>(WS.getSection());
1612 if (const MCSymbolWasm *C = Section.getGroup()) {