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()
633 static void overrideFields(ELFYAML::Section *From, typename ELFT::Shdr &To) { in overrideFields()
653 ELFYAML::Section *YAMLSec) { in initImplicitHeader()
790 ELFYAML::Section *Sec = cast<ELFYAML::Section>(D.get()); in initSectionHeaders()
909 ELFYAML::Section *YAMLSec) { in assignSectionAddress()
955 if (Sym.Section) in toELFSymbols()
956 Symbol.st_shndx = toSectionIndex(*Sym.Section, "", Sym.Name); in toELFSymbols()
972 ELFYAML::Section *YAMLSec) { in initSymtabSectionHeader()
1037 ELFYAML::Section *YAMLSec) { in initStrtabSectionHeader()
1095 ELFYAML::Section *YAMLSec) { in initDWARFSectionHeader()
1156 const ELFYAML::Section *S = cast<ELFYAML::Section>(C); in getPhdrFragments()
1228 cast<ELFYAML::Section>(C)->Type != ELF::SHT_NOBITS); in shouldAllocateFileSpace()
1253 Elf_Shdr &SHeader, const ELFYAML::RawContentSection &Section, in writeSectionContent() argument
1255 if (Section.Info) in writeSectionContent()
1256 SHeader.sh_info = *Section.Info; in writeSectionContent()
1267 Elf_Shdr &SHeader, const ELFYAML::RelocationSection &Section, in writeSectionContent() argument
1269 assert((Section.Type == llvm::ELF::SHT_REL || in writeSectionContent()
1270 Section.Type == llvm::ELF::SHT_RELA) && in writeSectionContent()
1273 if (!Section.RelocatableSec.empty()) in writeSectionContent()
1274 SHeader.sh_info = toSectionIndex(Section.RelocatableSec, Section.Name); in writeSectionContent()
1276 if (!Section.Relocations) in writeSectionContent()
1279 const bool IsRela = Section.Type == llvm::ELF::SHT_RELA; in writeSectionContent()
1280 for (const ELFYAML::Relocation &Rel : *Section.Relocations) { in writeSectionContent()
1281 const bool IsDynamic = Section.Link && (*Section.Link == ".dynsym"); in writeSectionContent()
1283 Rel.Symbol ? toSymbolIndex(*Rel.Symbol, Section.Name, IsDynamic) : 0; in writeSectionContent()
1301 Section.Relocations->size(); in writeSectionContent()
1306 const ELFYAML::RelrSection &Section, in writeSectionContent() argument
1308 if (!Section.Entries) in writeSectionContent()
1311 for (llvm::yaml::Hex64 E : *Section.Entries) { in writeSectionContent()
1313 reportError(Section.Name + ": the value is too large for 32-bits: 0x" + in writeSectionContent()
1318 SHeader.sh_size = sizeof(uintX_t) * Section.Entries->size(); in writeSectionContent()
1340 const ELFYAML::GroupSection &Section, in writeSectionContent() argument
1342 assert(Section.Type == llvm::ELF::SHT_GROUP && in writeSectionContent()
1345 if (Section.Signature) in writeSectionContent()
1347 toSymbolIndex(*Section.Signature, Section.Name, /*IsDynamic=*/false); in writeSectionContent()
1349 if (!Section.Members) in writeSectionContent()
1352 for (const ELFYAML::SectionOrType &Member : *Section.Members) { in writeSectionContent()
1357 SectionIndex = toSectionIndex(Member.sectionNameOrType, Section.Name); in writeSectionContent()
1360 SHeader.sh_size = SHeader.sh_entsize * Section.Members->size(); in writeSectionContent()
1365 const ELFYAML::SymverSection &Section, in writeSectionContent() argument
1367 if (!Section.Entries) in writeSectionContent()
1370 for (uint16_t Version : *Section.Entries) in writeSectionContent()
1372 SHeader.sh_size = Section.Entries->size() * SHeader.sh_entsize; in writeSectionContent()
1377 Elf_Shdr &SHeader, const ELFYAML::StackSizesSection &Section, in writeSectionContent() argument
1379 if (!Section.Entries) in writeSectionContent()
1382 for (const ELFYAML::StackSizeEntry &E : *Section.Entries) { in writeSectionContent()
1390 Elf_Shdr &SHeader, const ELFYAML::BBAddrMapSection &Section, in writeSectionContent() argument
1392 if (!Section.Entries) in writeSectionContent()
1395 for (const ELFYAML::BBAddrMapEntry &E : *Section.Entries) { in writeSectionContent()
1397 if (Section.Type == llvm::ELF::SHT_LLVM_BB_ADDR_MAP) { in writeSectionContent()
1425 Elf_Shdr &SHeader, const ELFYAML::LinkerOptionsSection &Section, in writeSectionContent() argument
1427 if (!Section.Options) in writeSectionContent()
1430 for (const ELFYAML::LinkerOption &LO : *Section.Options) { in writeSectionContent()
1441 Elf_Shdr &SHeader, const ELFYAML::DependentLibrariesSection &Section, in writeSectionContent() argument
1443 if (!Section.Libs) in writeSectionContent()
1446 for (StringRef Lib : *Section.Libs) { in writeSectionContent()
1479 Elf_Shdr &SHeader, const ELFYAML::CallGraphProfileSection &Section, in writeSectionContent() argument
1481 if (!Section.Entries) in writeSectionContent()
1484 for (const ELFYAML::CallGraphEntryWeight &E : *Section.Entries) { in writeSectionContent()
1492 const ELFYAML::HashSection &Section, in writeSectionContent() argument
1494 if (!Section.Bucket) in writeSectionContent()
1498 Section.NBucket.value_or(llvm::yaml::Hex64(Section.Bucket->size())), in writeSectionContent()
1501 Section.NChain.value_or(llvm::yaml::Hex64(Section.Chain->size())), in writeSectionContent()
1504 for (uint32_t Val : *Section.Bucket) in writeSectionContent()
1506 for (uint32_t Val : *Section.Chain) in writeSectionContent()
1509 SHeader.sh_size = (2 + Section.Bucket->size() + Section.Chain->size()) * 4; in writeSectionContent()
1514 const ELFYAML::VerdefSection &Section, in writeSectionContent() argument
1517 if (Section.Info) in writeSectionContent()
1518 SHeader.sh_info = *Section.Info; in writeSectionContent()
1519 else if (Section.Entries) in writeSectionContent()
1520 SHeader.sh_info = Section.Entries->size(); in writeSectionContent()
1522 if (!Section.Entries) in writeSectionContent()
1526 for (size_t I = 0; I < Section.Entries->size(); ++I) { in writeSectionContent()
1527 const ELFYAML::VerdefEntry &E = (*Section.Entries)[I]; in writeSectionContent()
1536 if (I == Section.Entries->size() - 1) in writeSectionContent()
1554 SHeader.sh_size = Section.Entries->size() * sizeof(Elf_Verdef) + in writeSectionContent()
1560 const ELFYAML::VerneedSection &Section, in writeSectionContent() argument
1562 if (Section.Info) in writeSectionContent()
1563 SHeader.sh_info = *Section.Info; in writeSectionContent()
1564 else if (Section.VerneedV) in writeSectionContent()
1565 SHeader.sh_info = Section.VerneedV->size(); in writeSectionContent()
1567 if (!Section.VerneedV) in writeSectionContent()
1571 for (size_t I = 0; I < Section.VerneedV->size(); ++I) { in writeSectionContent()
1572 const ELFYAML::VerneedEntry &VE = (*Section.VerneedV)[I]; in writeSectionContent()
1577 if (I == Section.VerneedV->size() - 1) in writeSectionContent()
1602 SHeader.sh_size = Section.VerneedV->size() * sizeof(Elf_Verneed) + in writeSectionContent()
1608 Elf_Shdr &SHeader, const ELFYAML::ARMIndexTableSection &Section, in writeSectionContent() argument
1610 if (!Section.Entries) in writeSectionContent()
1613 for (const ELFYAML::ARMIndexTableEntry &E : *Section.Entries) { in writeSectionContent()
1617 SHeader.sh_size = Section.Entries->size() * 8; in writeSectionContent()
1622 const ELFYAML::MipsABIFlags &Section, in writeSectionContent() argument
1624 assert(Section.Type == llvm::ELF::SHT_MIPS_ABIFLAGS && in writeSectionContent()
1631 Flags.version = Section.Version; in writeSectionContent()
1632 Flags.isa_level = Section.ISALevel; in writeSectionContent()
1633 Flags.isa_rev = Section.ISARevision; in writeSectionContent()
1634 Flags.gpr_size = Section.GPRSize; in writeSectionContent()
1635 Flags.cpr1_size = Section.CPR1Size; in writeSectionContent()
1636 Flags.cpr2_size = Section.CPR2Size; in writeSectionContent()
1637 Flags.fp_abi = Section.FpABI; in writeSectionContent()
1638 Flags.isa_ext = Section.ISAExtension; in writeSectionContent()
1639 Flags.ases = Section.ASEs; in writeSectionContent()
1640 Flags.flags1 = Section.Flags1; in writeSectionContent()
1641 Flags.flags2 = Section.Flags2; in writeSectionContent()
1647 const ELFYAML::DynamicSection &Section, in writeSectionContent() argument
1649 assert(Section.Type == llvm::ELF::SHT_DYNAMIC && in writeSectionContent()
1652 if (!Section.Entries) in writeSectionContent()
1655 for (const ELFYAML::DynamicEntry &DE : *Section.Entries) { in writeSectionContent()
1659 SHeader.sh_size = 2 * sizeof(uintX_t) * Section.Entries->size(); in writeSectionContent()
1664 const ELFYAML::AddrsigSection &Section, in writeSectionContent() argument
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()