Lines Matching refs:Shdr

64   Error dumpCommonSection(const Elf_Shdr *Shdr, ELFYAML::Section &S);
65 Error dumpCommonRelocationSection(const Elf_Shdr *Shdr,
71 Expected<ELFYAML::AddrsigSection *> dumpAddrsigSection(const Elf_Shdr *Shdr);
73 dumpLinkerOptionsSection(const Elf_Shdr *Shdr);
75 dumpDependentLibrariesSection(const Elf_Shdr *Shdr);
77 dumpCallGraphProfileSection(const Elf_Shdr *Shdr);
78 Expected<ELFYAML::DynamicSection *> dumpDynamicSection(const Elf_Shdr *Shdr);
79 Expected<ELFYAML::RelocationSection *> dumpRelocSection(const Elf_Shdr *Shdr);
80 Expected<ELFYAML::RelrSection *> dumpRelrSection(const Elf_Shdr *Shdr);
82 dumpContentSection(const Elf_Shdr *Shdr);
84 dumpSymtabShndxSection(const Elf_Shdr *Shdr);
85 Expected<ELFYAML::NoBitsSection *> dumpNoBitsSection(const Elf_Shdr *Shdr);
86 Expected<ELFYAML::HashSection *> dumpHashSection(const Elf_Shdr *Shdr);
87 Expected<ELFYAML::NoteSection *> dumpNoteSection(const Elf_Shdr *Shdr);
88 Expected<ELFYAML::GnuHashSection *> dumpGnuHashSection(const Elf_Shdr *Shdr);
89 Expected<ELFYAML::VerdefSection *> dumpVerdefSection(const Elf_Shdr *Shdr);
90 Expected<ELFYAML::SymverSection *> dumpSymverSection(const Elf_Shdr *Shdr);
91 Expected<ELFYAML::VerneedSection *> dumpVerneedSection(const Elf_Shdr *Shdr);
92 Expected<ELFYAML::GroupSection *> dumpGroupSection(const Elf_Shdr *Shdr);
94 dumpARMIndexTableSection(const Elf_Shdr *Shdr);
95 Expected<ELFYAML::MipsABIFlags *> dumpMipsABIFlags(const Elf_Shdr *Shdr);
97 dumpStackSizesSection(const Elf_Shdr *Shdr);
99 dumpBBAddrMapSection(const Elf_Shdr *Shdr);
101 dumpPlaceholderSection(const Elf_Shdr *Shdr);
239 ArrayRef<typename ELFT::Shdr> S) { in dumpSectionOffsets()
252 const typename ELFT::Shdr &SecHdr = S[Sec.OriginalSecNdx]; in dumpSectionOffsets()
440 const typename ELFT::Shdr &SHdr, in isInSegment()
558 ELFDumper<ELFT>::dumpPlaceholderSection(const Elf_Shdr *Shdr) { in dumpPlaceholderSection() argument
560 if (Error E = dumpCommonSection(Shdr, *S.get())) in dumpPlaceholderSection()
565 if ((Shdr->sh_type == ELF::SHT_SYMTAB || Shdr->sh_type == ELF::SHT_DYNSYM) && in dumpPlaceholderSection()
566 !Shdr->sh_size) in dumpPlaceholderSection()
732 const Elf_Shdr *Shdr = *ShdrOrErr; in dumpSymbol() local
733 if (!Shdr) in dumpSymbol()
736 auto NameOrErr = getUniquedSectionName(*Shdr); in dumpSymbol()
779 Error ELFDumper<ELFT>::dumpCommonSection(const Elf_Shdr *Shdr, in dumpCommonSection() argument
783 S.Type = Shdr->sh_type; in dumpCommonSection()
784 if (Shdr->sh_flags) in dumpCommonSection()
785 S.Flags = static_cast<ELFYAML::ELF_SHF>(Shdr->sh_flags); in dumpCommonSection()
786 if (Shdr->sh_addr) in dumpCommonSection()
787 S.Address = static_cast<uint64_t>(Shdr->sh_addr); in dumpCommonSection()
788 S.AddressAlign = Shdr->sh_addralign; in dumpCommonSection()
790 S.OriginalSecNdx = Shdr - &Sections[0]; in dumpCommonSection()
792 Expected<StringRef> NameOrErr = getUniquedSectionName(*Shdr); in dumpCommonSection()
797 if (Shdr->sh_entsize != ELFYAML::getDefaultShEntSize<ELFT>( in dumpCommonSection()
799 S.EntSize = static_cast<llvm::yaml::Hex64>(Shdr->sh_entsize); in dumpCommonSection()
801 if (Shdr->sh_link != ELF::SHN_UNDEF) { in dumpCommonSection()
802 Expected<const Elf_Shdr *> LinkSection = Obj.getSection(Shdr->sh_link); in dumpCommonSection()
820 const Elf_Shdr *Shdr, ELFYAML::RelocationSection &S) { in dumpCommonRelocationSection() argument
821 if (Error E = dumpCommonSection(Shdr, S)) in dumpCommonRelocationSection()
826 if (!Shdr->sh_info) in dumpCommonRelocationSection()
829 auto InfoSection = Obj.getSection(Shdr->sh_info); in dumpCommonRelocationSection()
843 ELFDumper<ELFT>::dumpStackSizesSection(const Elf_Shdr *Shdr) { in dumpStackSizesSection() argument
845 if (Error E = dumpCommonSection(Shdr, *S)) in dumpStackSizesSection()
848 auto ContentOrErr = Obj.getSectionContents(*Shdr); in dumpStackSizesSection()
876 ELFDumper<ELFT>::dumpBBAddrMapSection(const Elf_Shdr *Shdr) { in dumpBBAddrMapSection() argument
878 if (Error E = dumpCommonSection(Shdr, *S)) in dumpBBAddrMapSection()
881 auto ContentOrErr = Obj.getSectionContents(*Shdr); in dumpBBAddrMapSection()
896 if (Shdr->sh_type == ELF::SHT_LLVM_BB_ADDR_MAP) { in dumpBBAddrMapSection()
932 ELFDumper<ELFT>::dumpAddrsigSection(const Elf_Shdr *Shdr) { in dumpAddrsigSection() argument
934 if (Error E = dumpCommonSection(Shdr, *S)) in dumpAddrsigSection()
937 auto ContentOrErr = Obj.getSectionContents(*Shdr); in dumpAddrsigSection()
950 Expected<StringRef> SymbolName = getSymbolName(Shdr->sh_link, SymNdx); in dumpAddrsigSection()
973 ELFDumper<ELFT>::dumpLinkerOptionsSection(const Elf_Shdr *Shdr) { in dumpLinkerOptionsSection() argument
975 if (Error E = dumpCommonSection(Shdr, *S)) in dumpLinkerOptionsSection()
978 auto ContentOrErr = Obj.getSectionContents(*Shdr); in dumpLinkerOptionsSection()
1004 ELFDumper<ELFT>::dumpDependentLibrariesSection(const Elf_Shdr *Shdr) { in dumpDependentLibrariesSection() argument
1006 if (Error E = dumpCommonSection(Shdr, *DL)) in dumpDependentLibrariesSection()
1009 Expected<ArrayRef<uint8_t>> ContentOrErr = Obj.getSectionContents(*Shdr); in dumpDependentLibrariesSection()
1031 ELFDumper<ELFT>::dumpCallGraphProfileSection(const Elf_Shdr *Shdr) { in dumpCallGraphProfileSection() argument
1033 if (Error E = dumpCommonSection(Shdr, *S)) in dumpCallGraphProfileSection()
1036 Expected<ArrayRef<uint8_t>> ContentOrErr = Obj.getSectionContents(*Shdr); in dumpCallGraphProfileSection()
1077 ELFDumper<ELFT>::dumpDynamicSection(const Elf_Shdr *Shdr) { in dumpDynamicSection() argument
1079 if (Error E = dumpCommonSection(Shdr, *S)) in dumpDynamicSection()
1082 auto DynTagsOrErr = Obj.template getSectionContentsAsArray<Elf_Dyn>(*Shdr); in dumpDynamicSection()
1095 ELFDumper<ELFT>::dumpRelocSection(const Elf_Shdr *Shdr) { in dumpRelocSection() argument
1097 if (auto E = dumpCommonRelocationSection(Shdr, *S)) in dumpRelocSection()
1100 auto SymTabOrErr = Obj.getSection(Shdr->sh_link); in dumpRelocSection()
1104 if (Shdr->sh_size != 0) in dumpRelocSection()
1107 if (Shdr->sh_type == ELF::SHT_REL) { in dumpRelocSection()
1108 auto Rels = Obj.rels(*Shdr); in dumpRelocSection()
1118 auto Rels = Obj.relas(*Shdr); in dumpRelocSection()
1135 ELFDumper<ELFT>::dumpRelrSection(const Elf_Shdr *Shdr) { in dumpRelrSection() argument
1137 if (auto E = dumpCommonSection(Shdr, *S)) in dumpRelrSection()
1140 if (Expected<ArrayRef<Elf_Relr>> Relrs = Obj.relrs(*Shdr)) { in dumpRelrSection()
1150 Expected<ArrayRef<uint8_t>> ContentOrErr = Obj.getSectionContents(*Shdr); in dumpRelrSection()
1159 ELFDumper<ELFT>::dumpContentSection(const Elf_Shdr *Shdr) { in dumpContentSection() argument
1161 if (Error E = dumpCommonSection(Shdr, *S)) in dumpContentSection()
1164 unsigned SecIndex = Shdr - &Sections[0]; in dumpContentSection()
1165 if (SecIndex != 0 || Shdr->sh_type != ELF::SHT_NULL) { in dumpContentSection()
1166 auto ContentOrErr = Obj.getSectionContents(*Shdr); in dumpContentSection()
1173 S->Size = static_cast<llvm::yaml::Hex64>(Shdr->sh_size); in dumpContentSection()
1176 if (Shdr->sh_info) in dumpContentSection()
1177 S->Info = static_cast<llvm::yaml::Hex64>(Shdr->sh_info); in dumpContentSection()
1183 ELFDumper<ELFT>::dumpSymtabShndxSection(const Elf_Shdr *Shdr) { in dumpSymtabShndxSection() argument
1185 if (Error E = dumpCommonSection(Shdr, *S)) in dumpSymtabShndxSection()
1188 auto EntriesOrErr = Obj.template getSectionContentsAsArray<Elf_Word>(*Shdr); in dumpSymtabShndxSection()
1200 ELFDumper<ELFT>::dumpNoBitsSection(const Elf_Shdr *Shdr) { in dumpNoBitsSection() argument
1202 if (Error E = dumpCommonSection(Shdr, *S)) in dumpNoBitsSection()
1204 if (Shdr->sh_size) in dumpNoBitsSection()
1205 S->Size = static_cast<llvm::yaml::Hex64>(Shdr->sh_size); in dumpNoBitsSection()
1211 ELFDumper<ELFT>::dumpNoteSection(const Elf_Shdr *Shdr) { in dumpNoteSection() argument
1213 if (Error E = dumpCommonSection(Shdr, *S)) in dumpNoteSection()
1216 auto ContentOrErr = Obj.getSectionContents(*Shdr); in dumpNoteSection()
1247 ELFDumper<ELFT>::dumpHashSection(const Elf_Shdr *Shdr) { in dumpHashSection() argument
1249 if (Error E = dumpCommonSection(Shdr, *S)) in dumpHashSection()
1252 auto ContentOrErr = Obj.getSectionContents(*Shdr); in dumpHashSection()
1288 ELFDumper<ELFT>::dumpGnuHashSection(const Elf_Shdr *Shdr) { in dumpGnuHashSection() argument
1290 if (Error E = dumpCommonSection(Shdr, *S)) in dumpGnuHashSection()
1293 auto ContentOrErr = Obj.getSectionContents(*Shdr); in dumpGnuHashSection()
1339 ELFDumper<ELFT>::dumpVerdefSection(const Elf_Shdr *Shdr) { in dumpVerdefSection() argument
1341 if (Error E = dumpCommonSection(Shdr, *S)) in dumpVerdefSection()
1344 auto StringTableShdrOrErr = Obj.getSection(Shdr->sh_link); in dumpVerdefSection()
1352 auto Contents = Obj.getSectionContents(*Shdr); in dumpVerdefSection()
1390 if (Shdr->sh_info != S->Entries->size()) in dumpVerdefSection()
1391 S->Info = (llvm::yaml::Hex64)Shdr->sh_info; in dumpVerdefSection()
1398 ELFDumper<ELFT>::dumpSymverSection(const Elf_Shdr *Shdr) { in dumpSymverSection() argument
1400 if (Error E = dumpCommonSection(Shdr, *S)) in dumpSymverSection()
1403 auto VersionsOrErr = Obj.template getSectionContentsAsArray<Elf_Half>(*Shdr); in dumpSymverSection()
1416 ELFDumper<ELFT>::dumpVerneedSection(const Elf_Shdr *Shdr) { in dumpVerneedSection() argument
1418 if (Error E = dumpCommonSection(Shdr, *S)) in dumpVerneedSection()
1421 auto Contents = Obj.getSectionContents(*Shdr); in dumpVerneedSection()
1425 auto StringTableShdrOrErr = Obj.getSection(Shdr->sh_link); in dumpVerneedSection()
1465 if (Shdr->sh_info != S->VerneedV->size()) in dumpVerneedSection()
1466 S->Info = (llvm::yaml::Hex64)Shdr->sh_info; in dumpVerneedSection()
1491 ELFDumper<ELFT>::dumpGroupSection(const Elf_Shdr *Shdr) { in dumpGroupSection() argument
1493 if (Error E = dumpCommonSection(Shdr, *S)) in dumpGroupSection()
1497 Expected<StringRef> SymbolName = getSymbolName(Shdr->sh_link, Shdr->sh_info); in dumpGroupSection()
1502 auto MembersOrErr = Obj.template getSectionContentsAsArray<Elf_Word>(*Shdr); in dumpGroupSection()
1526 ELFDumper<ELFT>::dumpARMIndexTableSection(const Elf_Shdr *Shdr) { in dumpARMIndexTableSection() argument
1528 if (Error E = dumpCommonSection(Shdr, *S)) in dumpARMIndexTableSection()
1531 Expected<ArrayRef<uint8_t>> ContentOrErr = Obj.getSectionContents(*Shdr); in dumpARMIndexTableSection()
1553 ELFDumper<ELFT>::dumpMipsABIFlags(const Elf_Shdr *Shdr) { in dumpMipsABIFlags() argument
1554 assert(Shdr->sh_type == ELF::SHT_MIPS_ABIFLAGS && in dumpMipsABIFlags()
1557 if (Error E = dumpCommonSection(Shdr, *S)) in dumpMipsABIFlags()
1560 auto ContentOrErr = Obj.getSectionContents(*Shdr); in dumpMipsABIFlags()