Lines Matching defs:Section

229                           StringRef SecName, ELFYAML::Section *YAMLSec);
234 ELFYAML::Section *YAMLSec);
238 ELFYAML::Section *YAMLSec);
241 ELFYAML::Section *YAMLSec);
252 const ELFYAML::NoBitsSection &Section,
255 const ELFYAML::RawContentSection &Section,
258 const ELFYAML::RelocationSection &Section,
261 const ELFYAML::RelrSection &Section,
270 const ELFYAML::SymverSection &Section,
273 const ELFYAML::VerneedSection &Section,
276 const ELFYAML::VerdefSection &Section,
279 const ELFYAML::ARMIndexTableSection &Section,
282 const ELFYAML::MipsABIFlags &Section,
285 const ELFYAML::DynamicSection &Section,
288 const ELFYAML::StackSizesSection &Section,
291 const ELFYAML::BBAddrMapSection &Section,
294 const ELFYAML::HashSection &Section,
297 const ELFYAML::AddrsigSection &Section,
300 const ELFYAML::NoteSection &Section,
303 const ELFYAML::GnuHashSection &Section,
306 const ELFYAML::LinkerOptionsSection &Section,
309 const ELFYAML::DependentLibrariesSection &Section,
312 const ELFYAML::CallGraphProfileSection &Section,
319 void assignSectionAddress(Elf_Shdr &SHeader, ELFYAML::Section *YAMLSec);
360 std::vector<ELFYAML::Section *> Sections = Doc.getSections();
365 std::make_unique<ELFYAML::Section>(
432 std::unique_ptr<ELFYAML::Section> Sec = std::make_unique<ELFYAML::Section>(
550 std::vector<ELFYAML::Section *> Sections = Doc.getSections();
641 static void overrideFields(ELFYAML::Section *From, typename ELFT::Shdr &To) {
661 ELFYAML::Section *YAMLSec) {
798 ELFYAML::Section *Sec = cast<ELFYAML::Section>(D.get());
917 ELFYAML::Section *YAMLSec) {
963 if (Sym.Section)
964 Symbol.st_shndx = toSectionIndex(*Sym.Section, "", Sym.Name);
980 ELFYAML::Section *YAMLSec) {
1045 ELFYAML::Section *YAMLSec) {
1103 ELFYAML::Section *YAMLSec) {
1164 const ELFYAML::Section *S = cast<ELFYAML::Section>(C);
1236 cast<ELFYAML::Section>(C)->Type != ELF::SHT_NOBITS);
1261 Elf_Shdr &SHeader, const ELFYAML::RawContentSection &Section,
1263 if (Section.Info)
1264 SHeader.sh_info = *Section.Info;
1275 Elf_Shdr &SHeader, const ELFYAML::RelocationSection &Section,
1277 assert((Section.Type == llvm::ELF::SHT_REL ||
1278 Section.Type == llvm::ELF::SHT_RELA ||
1279 Section.Type == llvm::ELF::SHT_CREL) &&
1280 "Section type is not SHT_REL nor SHT_RELA");
1282 if (!Section.RelocatableSec.empty())
1283 SHeader.sh_info = toSectionIndex(Section.RelocatableSec, Section.Name);
1285 if (!Section.Relocations)
1288 const bool IsCrel = Section.Type == llvm::ELF::SHT_CREL;
1289 const bool IsRela = Section.Type == llvm::ELF::SHT_RELA;
1294 for (const ELFYAML::Relocation &Rel : *Section.Relocations)
1298 CBA.writeULEB128(Section.Relocations->size() * 8 + ELF::CREL_HDR_ADDEND +
1300 for (const ELFYAML::Relocation &Rel : *Section.Relocations) {
1301 const bool IsDynamic = Section.Link && (*Section.Link == ".dynsym");
1303 Rel.Symbol ? toSymbolIndex(*Rel.Symbol, Section.Name, IsDynamic) : 0;
1356 const ELFYAML::RelrSection &Section,
1358 if (!Section.Entries)
1361 for (llvm::yaml::Hex64 E : *Section.Entries) {
1363 reportError(Section.Name + ": the value is too large for 32-bits: 0x" +
1368 SHeader.sh_size = sizeof(uintX_t) * Section.Entries->size();
1390 const ELFYAML::GroupSection &Section,
1392 assert(Section.Type == llvm::ELF::SHT_GROUP &&
1393 "Section type is not SHT_GROUP");
1395 if (Section.Signature)
1397 toSymbolIndex(*Section.Signature, Section.Name, /*IsDynamic=*/false);
1399 if (!Section.Members)
1402 for (const ELFYAML::SectionOrType &Member : *Section.Members) {
1407 SectionIndex = toSectionIndex(Member.sectionNameOrType, Section.Name);
1410 SHeader.sh_size = SHeader.sh_entsize * Section.Members->size();
1415 const ELFYAML::SymverSection &Section,
1417 if (!Section.Entries)
1420 for (uint16_t Version : *Section.Entries)
1422 SHeader.sh_size = Section.Entries->size() * SHeader.sh_entsize;
1427 Elf_Shdr &SHeader, const ELFYAML::StackSizesSection &Section,
1429 if (!Section.Entries)
1432 for (const ELFYAML::StackSizeEntry &E : *Section.Entries) {
1440 Elf_Shdr &SHeader, const ELFYAML::BBAddrMapSection &Section,
1442 if (!Section.Entries) {
1443 if (Section.PGOAnalyses)
1451 if (Section.PGOAnalyses) {
1452 if (Section.Entries->size() != Section.PGOAnalyses->size())
1456 PGOAnalyses = &Section.PGOAnalyses.value();
1459 for (const auto &[Idx, E] : llvm::enumerate(*Section.Entries)) {
1461 if (Section.Type == llvm::ELF::SHT_LLVM_BB_ADDR_MAP) {
1507 if (Section.Type == llvm::ELF::SHT_LLVM_BB_ADDR_MAP && E.Version > 1)
1549 Elf_Shdr &SHeader, const ELFYAML::LinkerOptionsSection &Section,
1551 if (!Section.Options)
1554 for (const ELFYAML::LinkerOption &LO : *Section.Options) {
1565 Elf_Shdr &SHeader, const ELFYAML::DependentLibrariesSection &Section,
1567 if (!Section.Libs)
1570 for (StringRef Lib : *Section.Libs) {
1603 Elf_Shdr &SHeader, const ELFYAML::CallGraphProfileSection &Section,
1605 if (!Section.Entries)
1608 for (const ELFYAML::CallGraphEntryWeight &E : *Section.Entries) {
1616 const ELFYAML::HashSection &Section,
1618 if (!Section.Bucket)
1622 Section.NBucket.value_or(llvm::yaml::Hex64(Section.Bucket->size())),
1625 Section.NChain.value_or(llvm::yaml::Hex64(Section.Chain->size())),
1628 for (uint32_t Val : *Section.Bucket)
1630 for (uint32_t Val : *Section.Chain)
1633 SHeader.sh_size = (2 + Section.Bucket->size() + Section.Chain->size()) * 4;
1638 const ELFYAML::VerdefSection &Section,
1641 if (Section.Info)
1642 SHeader.sh_info = *Section.Info;
1643 else if (Section.Entries)
1644 SHeader.sh_info = Section.Entries->size();
1646 if (!Section.Entries)
1650 for (size_t I = 0; I < Section.Entries->size(); ++I) {
1651 const ELFYAML::VerdefEntry &E = (*Section.Entries)[I];
1660 if (I == Section.Entries->size() - 1)
1678 SHeader.sh_size = Section.Entries->size() * sizeof(Elf_Verdef) +
1684 const ELFYAML::VerneedSection &Section,
1686 if (Section.Info)
1687 SHeader.sh_info = *Section.Info;
1688 else if (Section.VerneedV)
1689 SHeader.sh_info = Section.VerneedV->size();
1691 if (!Section.VerneedV)
1695 for (size_t I = 0; I < Section.VerneedV->size(); ++I) {
1696 const ELFYAML::VerneedEntry &VE = (*Section.VerneedV)[I];
1701 if (I == Section.VerneedV->size() - 1)
1726 SHeader.sh_size = Section.VerneedV->size() * sizeof(Elf_Verneed) +
1732 Elf_Shdr &SHeader, const ELFYAML::ARMIndexTableSection &Section,
1734 if (!Section.Entries)
1737 for (const ELFYAML::ARMIndexTableEntry &E : *Section.Entries) {
1741 SHeader.sh_size = Section.Entries->size() * 8;
1746 const ELFYAML::MipsABIFlags &Section,
1748 assert(Section.Type == llvm::ELF::SHT_MIPS_ABIFLAGS &&
1749 "Section type is not SHT_MIPS_ABIFLAGS");
1755 Flags.version = Section.Version;
1756 Flags.isa_level = Section.ISALevel;
1757 Flags.isa_rev = Section.ISARevision;
1758 Flags.gpr_size = Section.GPRSize;
1759 Flags.cpr1_size = Section.CPR1Size;
1760 Flags.cpr2_size = Section.CPR2Size;
1761 Flags.fp_abi = Section.FpABI;
1762 Flags.isa_ext = Section.ISAExtension;
1763 Flags.ases = Section.ASEs;
1764 Flags.flags1 = Section.Flags1;
1765 Flags.flags2 = Section.Flags2;
1771 const ELFYAML::DynamicSection &Section,
1773 assert(Section.Type == llvm::ELF::SHT_DYNAMIC &&
1774 "Section type is not SHT_DYNAMIC");
1776 if (!Section.Entries)
1779 for (const ELFYAML::DynamicEntry &DE : *Section.Entries) {
1783 SHeader.sh_size = 2 * sizeof(uintX_t) * Section.Entries->size();
1788 const ELFYAML::AddrsigSection &Section,
1790 if (!Section.Symbols)
1793 for (StringRef Sym : *Section.Symbols)
1795 CBA.writeULEB128(toSymbolIndex(Sym, Section.Name, /*IsDynamic=*/false));
1800 const ELFYAML::NoteSection &Section,
1802 if (!Section.Notes)
1806 for (const ELFYAML::NoteEntry &NE : *Section.Notes) {
1841 const ELFYAML::GnuHashSection &Section,
1843 if (!Section.HashBuckets)
1846 if (!Section.Header)
1853 if (Section.Header->NBuckets)
1854 CBA.write<uint32_t>(*Section.Header->NBuckets, ELFT::Endianness);
1856 CBA.write<uint32_t>(Section.HashBuckets->size(), ELFT::Endianness);
1860 CBA.write<uint32_t>(Section.Header->SymNdx, ELFT::Endianness);
1864 if (Section.Header->MaskWords)
1865 CBA.write<uint32_t>(*Section.Header->MaskWords, ELFT::Endianness);
1867 CBA.write<uint32_t>(Section.BloomFilter->size(), ELFT::Endianness);
1870 CBA.write<uint32_t>(Section.Header->Shift2, ELFT::Endianness);
1873 for (llvm::yaml::Hex64 Val : *Section.BloomFilter)
1877 for (llvm::yaml::Hex32 Val : *Section.HashBuckets)
1881 for (llvm::yaml::Hex32 Val : *Section.HashValues)
1885 Section.BloomFilter->size() * sizeof(typename ELFT::uint) +
1886 Section.HashBuckets->size() * 4 +
1887 Section.HashValues->size() * 4;
1933 for (const ELFYAML::Section *S : Doc.getSections()) {
1958 std::vector<ELFYAML::Section *> Sections = Doc.getSections();
1967 for (const ELFYAML::Section *S : Sections)
1972 for (const ELFYAML::Section *S : Sections) {