Lines Matching refs:Elf_Shdr
226 std::string describe(const Elf_Shdr &Sec) const;
258 const Elf_Shdr *findSectionByName(StringRef Name) const;
263 virtual void printVersionSymbolSection(const Elf_Shdr *Sec) = 0;
264 virtual void printVersionDefinitionSection(const Elf_Shdr *Sec) = 0;
265 virtual void printVersionDependencySection(const Elf_Shdr *Sec) = 0;
268 printDependentLibsHelper(function_ref<void(const Elf_Shdr &)> OnSectionStart,
277 const Elf_Shdr &Sec, const Elf_Shdr *SymTab);
280 void printRelocationsHelper(const Elf_Shdr &Sec);
282 const Elf_Shdr &Sec, bool RawRelr,
284 const Elf_Shdr &, const Elf_Shdr *)>
288 virtual void printSymtabMessage(const Elf_Shdr *Symtab, size_t Offset, in printSymtabMessage()
300 getVersionTable(const Elf_Shdr &Sec, ArrayRef<Elf_Sym> *SymTab,
301 StringRef *StrTab, const Elf_Shdr **SymTabSec) const;
302 StringRef getPrintableSectionName(const Elf_Shdr &Sec) const;
312 Optional<const Elf_Shdr *> FunctionSec);
314 Optional<const Elf_Shdr *> FunctionSec,
315 const Elf_Shdr &StackSizeSec, DataExtractor Data,
317 void printStackSize(const Relocation<ELFT> &R, const Elf_Shdr &RelocSec,
318 unsigned Ndx, const Elf_Shdr *SymTab,
319 const Elf_Shdr *FunctionSec, const Elf_Shdr &StackSizeSec,
330 std::function<bool(const Elf_Shdr &)> IsMatch,
331 llvm::MapVector<const Elf_Shdr *, const Elf_Shdr *> &SecToRelocMap);
352 std::pair<const Elf_Phdr *, const Elf_Shdr *> findDynamic();
370 const Elf_Shdr *DotSymtabSec = nullptr;
371 const Elf_Shdr *DotDynsymSec = nullptr;
372 const Elf_Shdr *DotAddrsigSec = nullptr;
373 DenseMap<const Elf_Shdr *, ArrayRef<Elf_Word>> ShndxTables;
377 const Elf_Shdr *SymbolVersionSection = nullptr; // .gnu.version
378 const Elf_Shdr *SymbolVersionNeedSection = nullptr; // .gnu.version_r
379 const Elf_Shdr *SymbolVersionDefSection = nullptr; // .gnu.version_d
397 const Elf_Shdr *SymTab) const;
399 ArrayRef<Elf_Word> getShndxTable(const Elf_Shdr *Symtab) const;
406 std::string ELFDumper<ELFT>::describe(const Elf_Shdr &Sec) const { in describe()
456 ELFDumper<ELFT>::getVersionTable(const Elf_Shdr &Sec, ArrayRef<Elf_Sym> *SymTab, in getVersionTable()
458 const Elf_Shdr **SymTabSec) const { in getVersionTable()
499 const Elf_Shdr *SymtabSec = IsDynamic ? DotDynsymSec : DotSymtabSec; in printSymbolsHelper()
567 void printSymtabMessage(const Elf_Shdr *Symtab, size_t Offset,
571 void printVersionSymbolSection(const Elf_Shdr *Sec) override;
572 void printVersionDefinitionSection(const Elf_Shdr *Sec) override;
573 void printVersionDependencySection(const Elf_Shdr *Sec) override;
675 void printVersionSymbolSection(const Elf_Shdr *Sec) override;
676 void printVersionDefinitionSection(const Elf_Shdr *Sec) override;
677 void printVersionDependencySection(const Elf_Shdr *Sec) override;
819 const Elf_Shdr *SymTab) const { in getRelocationTarget()
847 ELFDumper<ELFT>::getShndxTable(const Elf_Shdr *Symtab) const { in getShndxTable()
971 Expected<const Elf_Shdr *> SecOrErr = Obj.getSection(SectionIndex); in getSymbolSectionName()
978 static const typename ELFO::Elf_Shdr *
981 for (const typename ELFO::Elf_Shdr &Shdr : cantFail(Obj.sections())) in findNotEmptySectionByAddress()
1725 const Elf_Shdr *DynamicSec = nullptr; in findDynamic()
1726 for (const Elf_Shdr &Sec : cantFail(Obj.sections())) { in findDynamic()
1766 const Elf_Shdr *DynamicSec; in loadDynamicTable()
1858 for (const Elf_Shdr &Sec : Sections) { in ELFDumper()
2212 for (const Elf_Shdr &Shdr : cantFail(Obj.sections())) { in findSectionByName()
2684 for (const Elf_Shdr &Sec : cantFail(Obj.sections())) { in printAttributes()
2749 const Elf_Shdr *getPltSymTable() const { return PltSymTable; } in getPltSymTable()
2752 const Elf_Shdr *GotSec;
2756 const Elf_Shdr *PltSec;
2757 const Elf_Shdr *PltRelSec;
2758 const Elf_Shdr *PltSymTable;
2893 if (Expected<const Elf_Shdr *> PltSymTableOrErr = in findPLT()
3104 const Elf_Shdr *RegInfoSec = findSectionByName(".reginfo"); in printMipsReginfo()
3168 const Elf_Shdr *MipsOpts = findSectionByName(".MIPS.options"); in printMipsOptions()
3205 const Elf_Shdr *StackMapSection = findSectionByName(".llvm_stackmaps"); in printStackMap()
3233 const Elf_Shdr &Sec, const Elf_Shdr *SymTab) { in printReloc()
3392 const Elf_Shdr &Symtab) -> StringRef { in getGroups()
3416 for (const Elf_Shdr &Sec : cantFail(Obj.sections())) { in getGroups()
3422 if (Expected<const Elf_Shdr *> SymtabOrErr = Obj.getSection(Sec.sh_link)) { in getGroups()
3463 if (Expected<const Elf_Shdr *> SecOrErr = Obj.getSection(Ndx)) { in getGroups()
3595 auto GetEntriesNum = [&](const Elf_Shdr &Sec) -> Expected<size_t> { in printRelocations()
3619 for (const Elf_Shdr &Sec : cantFail(this->Obj.sections())) { in printRelocations()
3697 ArrayRef<Elf_Shdr> Sections = cantFail(this->Obj.sections()); in printSectionHeaders()
3719 for (const Elf_Shdr &Sec : Sections) { in printSectionHeaders()
3758 void GNUELFDumper<ELFT>::printSymtabMessage(const Elf_Shdr *Symtab, in printSymtabMessage()
4076 ArrayRef<Elf_Shdr> Sections = cantFail(this->Obj.sections()); in printSectionDetails()
4111 for (const Elf_Shdr &S : Sections) { in printSectionDetails()
4340 DenseSet<const Elf_Shdr *> BelongsToSegment; in printSectionMapping()
4355 for (const Elf_Shdr &Sec : cantFail(this->Obj.sections())) { in printSectionMapping()
4376 for (const Elf_Shdr &Sec : cantFail(this->Obj.sections())) { in printSectionMapping()
4483 void ELFDumper<ELFT>::printRelocationsHelper(const Elf_Shdr &Sec) { in printRelocationsHelper()
4486 [&](const Relocation<ELFT> &R, unsigned Ndx, const Elf_Shdr &Sec, in printRelocationsHelper()
4487 const Elf_Shdr *SymTab) { printReloc(R, Ndx, Sec, SymTab); }, in printRelocationsHelper()
4554 void GNUELFDumper<ELFT>::printVersionSymbolSection(const Elf_Shdr *Sec) { in printVersionSymbolSection()
4639 void GNUELFDumper<ELFT>::printVersionDefinitionSection(const Elf_Shdr *Sec) { in printVersionDefinitionSection()
4666 void GNUELFDumper<ELFT>::printVersionDependencySection(const Elf_Shdr *Sec) { in printVersionDependencySection()
5794 function_ref<void(const Elf_Shdr &)> OnSectionStart, in printDependentLibsHelper()
5802 for (const Elf_Shdr &Shdr : cantFail(Obj.sections())) { in printDependentLibsHelper()
5831 const Elf_Shdr &Sec, bool RawRelr, in forEachRelocationDo() argument
5833 const Elf_Shdr &, const Elf_Shdr *)> in forEachRelocationDo()
5845 const Elf_Shdr *SymTab; in forEachRelocationDo()
5847 Expected<const Elf_Shdr *> SymTabOrErr = Obj.getSection(Sec.sh_link); in forEachRelocationDo()
5905 StringRef ELFDumper<ELFT>::getPrintableSectionName(const Elf_Shdr &Sec) const { in getPrintableSectionName()
5935 auto OnSectionStart = [&](const Elf_Shdr &Shdr) { in printDependentLibs()
5953 uint64_t SymValue, Optional<const Elf_Shdr *> FunctionSec) { in getSymbolIndexesForFunctionAddress()
5996 if (Expected<const Elf_Shdr *> SecOrErr = in getSymbolIndexesForFunctionAddress()
6019 uint64_t SymValue, Optional<const Elf_Shdr *> FunctionSec, in printFunctionStackSize()
6020 const Elf_Shdr &StackSizeSec, DataExtractor Data, uint64_t *Offset) { in printFunctionStackSize()
6063 const Elf_Shdr &RelocSec, unsigned Ndx, in printStackSize()
6064 const Elf_Shdr *SymTab, in printStackSize()
6065 const Elf_Shdr *FunctionSec, in printStackSize()
6066 const Elf_Shdr &StackSizeSec, in printStackSize()
6082 Expected<const Elf_Shdr *> SectionOrErr = in printStackSize()
6119 for (const Elf_Shdr &Sec : cantFail(Obj.sections())) { in printNonRelocatableStackSizes()
6146 std::function<bool(const Elf_Shdr &)> IsMatch, in getSectionAndRelocations()
6147 llvm::MapVector<const Elf_Shdr *, const Elf_Shdr *> &SecToRelocMap) { in getSectionAndRelocations() argument
6148 for (const Elf_Shdr &Sec : cantFail(Obj.sections())) { in getSectionAndRelocations()
6150 if (SecToRelocMap.insert(std::make_pair(&Sec, (const Elf_Shdr *)nullptr)) in getSectionAndRelocations()
6157 Expected<const Elf_Shdr *> RelSecOrErr = Obj.getSection(Sec.sh_info); in getSectionAndRelocations()
6164 const Elf_Shdr *ContentsSec = *RelSecOrErr; in getSectionAndRelocations()
6175 llvm::MapVector<const Elf_Shdr *, const Elf_Shdr *> StackSizeRelocMap; in printRelocatableStackSizes()
6176 auto IsMatch = [&](const Elf_Shdr &Sec) -> bool { in printRelocatableStackSizes()
6189 const Elf_Shdr *StackSizesELFSec = StackSizeMapEntry.first; in printRelocatableStackSizes()
6190 const Elf_Shdr *RelocSec = StackSizeMapEntry.second; in printRelocatableStackSizes()
6204 const Elf_Shdr *FunctionSec = unwrapOrError( in printRelocatableStackSizes()
6216 [&](const Relocation<ELFT> &R, unsigned Ndx, const Elf_Shdr &Sec, in printRelocatableStackSizes()
6217 const Elf_Shdr *SymTab) { in printRelocatableStackSizes()
6572 for (const Elf_Shdr &Sec : cantFail(this->Obj.sections())) { in printRelocations()
6622 for (const Elf_Shdr &Sec : cantFail(this->Obj.sections())) { in printSectionHeaders()
6655 const Elf_Shdr *SymSec = unwrapOrError( in printSectionHeaders()
6863 void LLVMELFDumper<ELFT>::printVersionSymbolSection(const Elf_Shdr *Sec) { in printVersionSymbolSection()
6870 const Elf_Shdr *SymTabSec; in printVersionSymbolSection()
6897 void LLVMELFDumper<ELFT>::printVersionDefinitionSection(const Elf_Shdr *Sec) { in printVersionDefinitionSection()
6922 void LLVMELFDumper<ELFT>::printVersionDependencySection(const Elf_Shdr *Sec) { in printVersionDependencySection()
7005 llvm::MapVector<const Elf_Shdr *, const Elf_Shdr *> SecToRelocMap; in printCGProfile()
7007 auto IsMatch = [](const Elf_Shdr &Sec) -> bool { in printCGProfile()
7013 const Elf_Shdr *CGSection = CGMapEntry.first; in printCGProfile()
7014 const Elf_Shdr *CGRelSection = CGMapEntry.second; in printCGProfile()
7051 for (const Elf_Shdr &Sec : cantFail(this->Obj.sections())) { in printBBAddrMaps()
7056 Optional<const Elf_Shdr *> FunctionSec = None; in printBBAddrMaps()
7276 for (const Elf_Shdr &Shdr : cantFail(this->Obj.sections())) { in printELFLinkerOptions()
7319 [](const Elf_Shdr &) {}, in printDependentLibs() argument