Lines Matching refs:Section
221 StringRef SecName, ELFYAML::Section *YAMLSec);
226 ELFYAML::Section *YAMLSec);
230 ELFYAML::Section *YAMLSec);
233 ELFYAML::Section *YAMLSec);
244 const ELFYAML::NoBitsSection &Section,
247 const ELFYAML::RawContentSection &Section,
250 const ELFYAML::RelocationSection &Section,
253 const ELFYAML::RelrSection &Section,
262 const ELFYAML::SymverSection &Section,
265 const ELFYAML::VerneedSection &Section,
268 const ELFYAML::VerdefSection &Section,
271 const ELFYAML::ARMIndexTableSection &Section,
274 const ELFYAML::MipsABIFlags &Section,
277 const ELFYAML::DynamicSection &Section,
280 const ELFYAML::StackSizesSection &Section,
283 const ELFYAML::BBAddrMapSection &Section,
286 const ELFYAML::HashSection &Section,
289 const ELFYAML::AddrsigSection &Section,
292 const ELFYAML::NoteSection &Section,
295 const ELFYAML::GnuHashSection &Section,
298 const ELFYAML::LinkerOptionsSection &Section,
301 const ELFYAML::DependentLibrariesSection &Section,
304 const ELFYAML::CallGraphProfileSection &Section,
311 void assignSectionAddress(Elf_Shdr &SHeader, ELFYAML::Section *YAMLSec);
352 std::vector<ELFYAML::Section *> Sections = Doc.getSections(); in ELFState()
357 std::make_unique<ELFYAML::Section>( in ELFState()
424 std::unique_ptr<ELFYAML::Section> Sec = std::make_unique<ELFYAML::Section>( in ELFState()
542 std::vector<ELFYAML::Section *> Sections = Doc.getSections(); in initProgramHeaders()
634 static void overrideFields(ELFYAML::Section *From, typename ELFT::Shdr &To) { in overrideFields()
654 ELFYAML::Section *YAMLSec) { in initImplicitHeader()
791 ELFYAML::Section *Sec = cast<ELFYAML::Section>(D.get()); in initSectionHeaders()
910 ELFYAML::Section *YAMLSec) { in assignSectionAddress()
956 if (Sym.Section) in toELFSymbols()
957 Symbol.st_shndx = toSectionIndex(*Sym.Section, "", Sym.Name); in toELFSymbols()
973 ELFYAML::Section *YAMLSec) { in initSymtabSectionHeader()
1038 ELFYAML::Section *YAMLSec) { in initStrtabSectionHeader()
1096 ELFYAML::Section *YAMLSec) { in initDWARFSectionHeader()
1157 const ELFYAML::Section *S = cast<ELFYAML::Section>(C); in getPhdrFragments()
1229 cast<ELFYAML::Section>(C)->Type != ELF::SHT_NOBITS); in shouldAllocateFileSpace()
1254 Elf_Shdr &SHeader, const ELFYAML::RawContentSection &Section, in writeSectionContent() argument
1256 if (Section.Info) in writeSectionContent()
1257 SHeader.sh_info = *Section.Info; in writeSectionContent()
1268 Elf_Shdr &SHeader, const ELFYAML::RelocationSection &Section, in writeSectionContent() argument
1270 assert((Section.Type == llvm::ELF::SHT_REL || in writeSectionContent()
1271 Section.Type == llvm::ELF::SHT_RELA) && in writeSectionContent()
1274 if (!Section.RelocatableSec.empty()) in writeSectionContent()
1275 SHeader.sh_info = toSectionIndex(Section.RelocatableSec, Section.Name); in writeSectionContent()
1277 if (!Section.Relocations) in writeSectionContent()
1280 const bool IsRela = Section.Type == llvm::ELF::SHT_RELA; in writeSectionContent()
1281 for (const ELFYAML::Relocation &Rel : *Section.Relocations) { in writeSectionContent()
1282 const bool IsDynamic = Section.Link && (*Section.Link == ".dynsym"); in writeSectionContent()
1284 Rel.Symbol ? toSymbolIndex(*Rel.Symbol, Section.Name, IsDynamic) : 0; in writeSectionContent()
1302 Section.Relocations->size(); in writeSectionContent()
1307 const ELFYAML::RelrSection &Section, in writeSectionContent() argument
1309 if (!Section.Entries) in writeSectionContent()
1312 for (llvm::yaml::Hex64 E : *Section.Entries) { in writeSectionContent()
1314 reportError(Section.Name + ": the value is too large for 32-bits: 0x" + in writeSectionContent()
1319 SHeader.sh_size = sizeof(uintX_t) * Section.Entries->size(); in writeSectionContent()
1341 const ELFYAML::GroupSection &Section, in writeSectionContent() argument
1343 assert(Section.Type == llvm::ELF::SHT_GROUP && in writeSectionContent()
1346 if (Section.Signature) in writeSectionContent()
1348 toSymbolIndex(*Section.Signature, Section.Name, /*IsDynamic=*/false); in writeSectionContent()
1350 if (!Section.Members) in writeSectionContent()
1353 for (const ELFYAML::SectionOrType &Member : *Section.Members) { in writeSectionContent()
1358 SectionIndex = toSectionIndex(Member.sectionNameOrType, Section.Name); in writeSectionContent()
1361 SHeader.sh_size = SHeader.sh_entsize * Section.Members->size(); in writeSectionContent()
1366 const ELFYAML::SymverSection &Section, in writeSectionContent() argument
1368 if (!Section.Entries) in writeSectionContent()
1371 for (uint16_t Version : *Section.Entries) in writeSectionContent()
1373 SHeader.sh_size = Section.Entries->size() * SHeader.sh_entsize; in writeSectionContent()
1378 Elf_Shdr &SHeader, const ELFYAML::StackSizesSection &Section, in writeSectionContent() argument
1380 if (!Section.Entries) in writeSectionContent()
1383 if (!Section.Entries) in writeSectionContent()
1386 for (const ELFYAML::StackSizeEntry &E : *Section.Entries) { in writeSectionContent()
1394 Elf_Shdr &SHeader, const ELFYAML::BBAddrMapSection &Section, in writeSectionContent() argument
1396 if (!Section.Entries) in writeSectionContent()
1399 for (const ELFYAML::BBAddrMapEntry &E : *Section.Entries) { in writeSectionContent()
1419 Elf_Shdr &SHeader, const ELFYAML::LinkerOptionsSection &Section, in writeSectionContent() argument
1421 if (!Section.Options) in writeSectionContent()
1424 for (const ELFYAML::LinkerOption &LO : *Section.Options) { in writeSectionContent()
1435 Elf_Shdr &SHeader, const ELFYAML::DependentLibrariesSection &Section, in writeSectionContent() argument
1437 if (!Section.Libs) in writeSectionContent()
1440 for (StringRef Lib : *Section.Libs) { in writeSectionContent()
1473 Elf_Shdr &SHeader, const ELFYAML::CallGraphProfileSection &Section, in writeSectionContent() argument
1475 if (!Section.Entries) in writeSectionContent()
1478 for (const ELFYAML::CallGraphEntryWeight &E : *Section.Entries) { in writeSectionContent()
1486 const ELFYAML::HashSection &Section, in writeSectionContent() argument
1488 if (!Section.Bucket) in writeSectionContent()
1491 if (!Section.Bucket) in writeSectionContent()
1495 Section.NBucket.getValueOr(llvm::yaml::Hex64(Section.Bucket->size())), in writeSectionContent()
1498 Section.NChain.getValueOr(llvm::yaml::Hex64(Section.Chain->size())), in writeSectionContent()
1501 for (uint32_t Val : *Section.Bucket) in writeSectionContent()
1503 for (uint32_t Val : *Section.Chain) in writeSectionContent()
1506 SHeader.sh_size = (2 + Section.Bucket->size() + Section.Chain->size()) * 4; in writeSectionContent()
1511 const ELFYAML::VerdefSection &Section, in writeSectionContent() argument
1514 if (Section.Info) in writeSectionContent()
1515 SHeader.sh_info = *Section.Info; in writeSectionContent()
1516 else if (Section.Entries) in writeSectionContent()
1517 SHeader.sh_info = Section.Entries->size(); in writeSectionContent()
1519 if (!Section.Entries) in writeSectionContent()
1523 for (size_t I = 0; I < Section.Entries->size(); ++I) { in writeSectionContent()
1524 const ELFYAML::VerdefEntry &E = (*Section.Entries)[I]; in writeSectionContent()
1533 if (I == Section.Entries->size() - 1) in writeSectionContent()
1551 SHeader.sh_size = Section.Entries->size() * sizeof(Elf_Verdef) + in writeSectionContent()
1557 const ELFYAML::VerneedSection &Section, in writeSectionContent() argument
1559 if (Section.Info) in writeSectionContent()
1560 SHeader.sh_info = *Section.Info; in writeSectionContent()
1561 else if (Section.VerneedV) in writeSectionContent()
1562 SHeader.sh_info = Section.VerneedV->size(); in writeSectionContent()
1564 if (!Section.VerneedV) in writeSectionContent()
1568 for (size_t I = 0; I < Section.VerneedV->size(); ++I) { in writeSectionContent()
1569 const ELFYAML::VerneedEntry &VE = (*Section.VerneedV)[I]; in writeSectionContent()
1574 if (I == Section.VerneedV->size() - 1) in writeSectionContent()
1599 SHeader.sh_size = Section.VerneedV->size() * sizeof(Elf_Verneed) + in writeSectionContent()
1605 Elf_Shdr &SHeader, const ELFYAML::ARMIndexTableSection &Section, in writeSectionContent() argument
1607 if (!Section.Entries) in writeSectionContent()
1610 for (const ELFYAML::ARMIndexTableEntry &E : *Section.Entries) { in writeSectionContent()
1614 SHeader.sh_size = Section.Entries->size() * 8; in writeSectionContent()
1619 const ELFYAML::MipsABIFlags &Section, in writeSectionContent() argument
1621 assert(Section.Type == llvm::ELF::SHT_MIPS_ABIFLAGS && in writeSectionContent()
1628 Flags.version = Section.Version; in writeSectionContent()
1629 Flags.isa_level = Section.ISALevel; in writeSectionContent()
1630 Flags.isa_rev = Section.ISARevision; in writeSectionContent()
1631 Flags.gpr_size = Section.GPRSize; in writeSectionContent()
1632 Flags.cpr1_size = Section.CPR1Size; in writeSectionContent()
1633 Flags.cpr2_size = Section.CPR2Size; in writeSectionContent()
1634 Flags.fp_abi = Section.FpABI; in writeSectionContent()
1635 Flags.isa_ext = Section.ISAExtension; in writeSectionContent()
1636 Flags.ases = Section.ASEs; in writeSectionContent()
1637 Flags.flags1 = Section.Flags1; in writeSectionContent()
1638 Flags.flags2 = Section.Flags2; in writeSectionContent()
1644 const ELFYAML::DynamicSection &Section, in writeSectionContent() argument
1646 assert(Section.Type == llvm::ELF::SHT_DYNAMIC && in writeSectionContent()
1649 if (!Section.Entries) in writeSectionContent()
1652 for (const ELFYAML::DynamicEntry &DE : *Section.Entries) { in writeSectionContent()
1656 SHeader.sh_size = 2 * sizeof(uintX_t) * Section.Entries->size(); in writeSectionContent()
1661 const ELFYAML::AddrsigSection &Section, in writeSectionContent() argument
1663 if (!Section.Symbols) in writeSectionContent()
1666 if (!Section.Symbols) in writeSectionContent()
1669 for (StringRef Sym : *Section.Symbols) in writeSectionContent()
1671 CBA.writeULEB128(toSymbolIndex(Sym, Section.Name, /*IsDynamic=*/false)); in writeSectionContent()
1676 const ELFYAML::NoteSection &Section, in writeSectionContent() argument
1678 if (!Section.Notes) in writeSectionContent()
1682 for (const ELFYAML::NoteEntry &NE : *Section.Notes) { in writeSectionContent()
1717 const ELFYAML::GnuHashSection &Section, in writeSectionContent() argument
1719 if (!Section.HashBuckets) in writeSectionContent()
1722 if (!Section.Header) in writeSectionContent()
1729 if (Section.Header->NBuckets) in writeSectionContent()
1730 CBA.write<uint32_t>(*Section.Header->NBuckets, ELFT::TargetEndianness); in writeSectionContent()
1732 CBA.write<uint32_t>(Section.HashBuckets->size(), ELFT::TargetEndianness); in writeSectionContent()
1736 CBA.write<uint32_t>(Section.Header->SymNdx, ELFT::TargetEndianness); in writeSectionContent()
1740 if (Section.Header->MaskWords) in writeSectionContent()
1741 CBA.write<uint32_t>(*Section.Header->MaskWords, ELFT::TargetEndianness); in writeSectionContent()
1743 CBA.write<uint32_t>(Section.BloomFilter->size(), ELFT::TargetEndianness); in writeSectionContent()
1746 CBA.write<uint32_t>(Section.Header->Shift2, ELFT::TargetEndianness); in writeSectionContent()
1749 for (llvm::yaml::Hex64 Val : *Section.BloomFilter) in writeSectionContent()
1753 for (llvm::yaml::Hex32 Val : *Section.HashBuckets) in writeSectionContent()
1757 for (llvm::yaml::Hex32 Val : *Section.HashValues) in writeSectionContent()
1761 Section.BloomFilter->size() * sizeof(typename ELFT::uint) + in writeSectionContent()
1762 Section.HashBuckets->size() * 4 + in writeSectionContent()
1763 Section.HashValues->size() * 4; in writeSectionContent()
1809 for (const ELFYAML::Section *S : Doc.getSections()) { in buildSectionHeaderReorderMap()
1834 std::vector<ELFYAML::Section *> Sections = Doc.getSections(); in buildSectionIndex()
1843 for (const ELFYAML::Section *S : Sections) in buildSectionIndex()
1848 for (const ELFYAML::Section *S : Sections) { in buildSectionIndex()