Lines Matching refs:Sec
178 void defineSection(MCSectionCOFF const &Sec, const MCAsmLayout &Layout);
198 const COFFSection &Sec);
243 static bool isDwoSection(const MCSection &Sec) { in isDwoSection() argument
244 return Sec.getName().ends_with(".dwo"); in isDwoSection()
289 static uint32_t getAlignment(const MCSectionCOFF &Sec) { in getAlignment() argument
290 switch (Sec.getAlign().value()) { in getAlignment()
406 COFFSection *Sec = nullptr; in DefineSymbol() local
408 Sec = SectionMap[Base->getFragment()->getParent()]; in DefineSymbol()
409 if (Sym->Section && Sym->Section != Sec) in DefineSymbol()
422 if (!Sec) in DefineSymbol()
425 WeakDefault->Section = Sec; in DefineSymbol()
443 Sym->Section = Sec; in DefineSymbol()
625 const COFFSection &Sec) { in writeSection() argument
626 if (Sec.Number == -1) in writeSection()
630 if (Sec.Header.PointerToRawData != 0) { in writeSection()
631 assert(W.OS.tell() == Sec.Header.PointerToRawData && in writeSection()
634 uint32_t CRC = writeSectionContents(Asm, Layout, *Sec.MCSection); in writeSection()
637 COFFSymbol::AuxiliarySymbols &AuxSyms = Sec.Symbol->Aux; in writeSection()
644 if (Sec.Relocations.empty()) { in writeSection()
645 assert(Sec.Header.PointerToRelocations == 0 && in writeSection()
650 assert(W.OS.tell() == Sec.Header.PointerToRelocations && in writeSection()
653 if (Sec.Relocations.size() >= 0xffff) { in writeSection()
657 R.VirtualAddress = Sec.Relocations.size() + 1; in writeSection()
663 for (const auto &Relocation : Sec.Relocations) in writeSection()
774 COFFSection *Sec = SectionMap[&Section]; in assignFileOffsets() local
776 if (!Sec || Sec->Number == -1) in assignFileOffsets()
779 Sec->Header.SizeOfRawData = Layout.getSectionAddressSize(&Section); in assignFileOffsets()
781 if (IsPhysicalSection(Sec)) { in assignFileOffsets()
782 Sec->Header.PointerToRawData = Offset; in assignFileOffsets()
783 Offset += Sec->Header.SizeOfRawData; in assignFileOffsets()
786 if (!Sec->Relocations.empty()) { in assignFileOffsets()
787 bool RelocationsOverflow = Sec->Relocations.size() >= 0xffff; in assignFileOffsets()
792 Sec->Header.NumberOfRelocations = 0xffff; in assignFileOffsets()
794 Sec->Header.NumberOfRelocations = Sec->Relocations.size(); in assignFileOffsets()
796 Sec->Header.PointerToRelocations = Offset; in assignFileOffsets()
803 Offset += COFF::RelocationSize * Sec->Relocations.size(); in assignFileOffsets()
805 for (auto &Relocation : Sec->Relocations) { in assignFileOffsets()
811 assert(Sec->Symbol->Aux.size() == 1 && in assignFileOffsets()
813 AuxSymbol &Aux = Sec->Symbol->Aux[0]; in assignFileOffsets()
816 Aux.Aux.SectionDefinition.Length = Sec->Header.SizeOfRawData; in assignFileOffsets()
818 Sec->Header.NumberOfRelocations; in assignFileOffsets()
820 Sec->Header.NumberOfLineNumbers; in assignFileOffsets()
883 COFFSection *Sec = SectionMap[MCSec]; in recordRelocation() local
1004 Sec->Relocations.push_back(Reloc); in recordRelocation()
1162 for (std::unique_ptr<COFFSection> &Sec : Sections) in writeObject()
1163 writeSection(Asm, Layout, *Sec); in writeObject()