Lines Matching defs:Elf_Shdr
238 std::string describe(const Elf_Shdr &Sec) const;
273 const Elf_Shdr *findSectionByName(StringRef Name) const;
278 virtual void printVersionSymbolSection(const Elf_Shdr *Sec) = 0;
279 virtual void printVersionDefinitionSection(const Elf_Shdr *Sec) = 0;
280 virtual void printVersionDependencySection(const Elf_Shdr *Sec) = 0;
283 printDependentLibsHelper(function_ref<void(const Elf_Shdr &)> OnSectionStart,
291 const Elf_Shdr &Sec, const Elf_Shdr *SymTab);
294 void printRelocationsHelper(const Elf_Shdr &Sec);
296 const Elf_Shdr &Sec,
298 const Elf_Shdr &, const Elf_Shdr *)>
301 virtual void printSymtabMessage(const Elf_Shdr *Symtab, size_t Offset,
326 getVersionTable(const Elf_Shdr &Sec, ArrayRef<Elf_Sym> *SymTab,
327 StringRef *StrTab, const Elf_Shdr **SymTabSec) const;
328 StringRef getPrintableSectionName(const Elf_Shdr &Sec) const;
337 uint64_t SymValue, std::optional<const Elf_Shdr *> FunctionSec);
339 std::optional<const Elf_Shdr *> FunctionSec,
340 const Elf_Shdr &StackSizeSec, DataExtractor Data,
342 void printStackSize(const Relocation<ELFT> &R, const Elf_Shdr &RelocSec,
343 unsigned Ndx, const Elf_Shdr *SymTab,
344 const Elf_Shdr *FunctionSec, const Elf_Shdr &StackSizeSec,
371 std::pair<const Elf_Phdr *, const Elf_Shdr *> findDynamic();
390 const Elf_Shdr *DotSymtabSec = nullptr;
391 const Elf_Shdr *DotDynsymSec = nullptr;
392 const Elf_Shdr *DotAddrsigSec = nullptr;
393 DenseMap<const Elf_Shdr *, ArrayRef<Elf_Word>> ShndxTables;
397 const Elf_Shdr *SymbolVersionSection = nullptr; // .gnu.version
398 const Elf_Shdr *SymbolVersionNeedSection = nullptr; // .gnu.version_r
399 const Elf_Shdr *SymbolVersionDefSection = nullptr; // .gnu.version_d
418 const Elf_Shdr *SymTab) const;
420 ArrayRef<Elf_Word> getShndxTable(const Elf_Shdr *Symtab) const;
427 std::string ELFDumper<ELFT>::describe(const Elf_Shdr &Sec) const {
477 ELFDumper<ELFT>::getVersionTable(const Elf_Shdr &Sec, ArrayRef<Elf_Sym> *SymTab,
479 const Elf_Shdr **SymTabSec) const {
543 const Elf_Shdr *SymtabSec = IsDynamic ? DotDynsymSec : DotSymtabSec;
599 void printSymtabMessage(const Elf_Shdr *Symtab, size_t Offset,
604 void printVersionSymbolSection(const Elf_Shdr *Sec) override;
605 void printVersionDefinitionSection(const Elf_Shdr *Sec) override;
606 void printVersionDependencySection(const Elf_Shdr *Sec) override;
670 void printRelr(const Elf_Shdr &Sec);
715 void printVersionSymbolSection(const Elf_Shdr *Sec) override;
716 void printVersionDefinitionSection(const Elf_Shdr *Sec) override;
717 void printVersionDependencySection(const Elf_Shdr *Sec) override;
762 virtual void printRelocationSectionInfo(const Elf_Shdr &Sec, StringRef Name,
790 void printRelocationSectionInfo(const Elf_Shdr &Sec, StringRef Name,
897 const Elf_Shdr *SymTab) const {
925 ELFDumper<ELFT>::getShndxTable(const Elf_Shdr *Symtab) const {
1048 Expected<const Elf_Shdr *> SecOrErr = Obj.getSection(SectionIndex);
1055 static const typename ELFO::Elf_Shdr *
1058 for (const typename ELFO::Elf_Shdr &Shdr : cantFail(Obj.sections()))
1787 const Elf_Shdr *DynamicSec = nullptr;
1788 for (const Elf_Shdr &Sec : cantFail(Obj.sections())) {
1828 const Elf_Shdr *DynamicSec;
1920 for (const Elf_Shdr &Sec : Sections) {
2294 for (const Elf_Shdr &Shdr : cantFail(Obj.sections())) {
2904 for (const Elf_Shdr &Sec : cantFail(Obj.sections())) {
2969 const Elf_Shdr *getPltSymTable() const { return PltSymTable; }
2972 const Elf_Shdr *GotSec;
2976 const Elf_Shdr *PltSec;
2977 const Elf_Shdr *PltRelSec;
2978 const Elf_Shdr *PltSymTable;
3113 if (Expected<const Elf_Shdr *> PltSymTableOrErr =
3324 const Elf_Shdr *RegInfoSec = findSectionByName(".reginfo");
3388 const Elf_Shdr *MipsOpts = findSectionByName(".MIPS.options");
3425 const Elf_Shdr *StackMapSection = findSectionByName(".llvm_stackmaps");
3453 const Elf_Shdr &Sec, const Elf_Shdr *SymTab) {
3695 const Elf_Shdr &Symtab) -> StringRef {
3719 for (const Elf_Shdr &Sec : cantFail(Obj.sections())) {
3725 if (Expected<const Elf_Shdr *> SymtabOrErr = Obj.getSection(Sec.sh_link)) {
3766 if (Expected<const Elf_Shdr *> SecOrErr = Obj.getSection(Ndx)) {
3896 auto PrintAsRelr = [&](const Elf_Shdr &Sec) {
3902 auto GetEntriesNum = [&](const Elf_Shdr &Sec) -> Expected<size_t> {
3936 for (const Elf_Shdr &Sec : cantFail(this->Obj.sections())) {
3975 template <class ELFT> void GNUELFDumper<ELFT>::printRelr(const Elf_Shdr &Sec) {
4098 ArrayRef<Elf_Shdr> Sections = cantFail(this->Obj.sections());
4129 for (const Elf_Shdr &Sec : Sections) {
4168 void GNUELFDumper<ELFT>::printSymtabMessage(const Elf_Shdr *Symtab,
4511 ArrayRef<Elf_Shdr> Sections = cantFail(this->Obj.sections());
4554 for (const Elf_Shdr &S : Sections) {
4779 DenseSet<const Elf_Shdr *> BelongsToSegment;
4794 for (const Elf_Shdr &Sec : cantFail(this->Obj.sections())) {
4816 for (const Elf_Shdr &Sec : cantFail(this->Obj.sections())) {
4923 void ELFDumper<ELFT>::printRelocationsHelper(const Elf_Shdr &Sec) {
4925 Sec, [&](const Relocation<ELFT> &R, unsigned Ndx, const Elf_Shdr &Sec,
4926 const Elf_Shdr *SymTab) { printReloc(R, Ndx, Sec, SymTab); });
5022 void GNUELFDumper<ELFT>::printVersionSymbolSection(const Elf_Shdr *Sec) {
5107 void GNUELFDumper<ELFT>::printVersionDefinitionSection(const Elf_Shdr *Sec) {
5134 void GNUELFDumper<ELFT>::printVersionDependencySection(const Elf_Shdr *Sec) {
6385 function_ref<void(const Elf_Shdr &)> OnSectionStart,
6393 for (const Elf_Shdr &Shdr : cantFail(Obj.sections())) {
6422 const Elf_Shdr &Sec,
6424 const Elf_Shdr &, const Elf_Shdr *)>
6435 const Elf_Shdr *SymTab;
6439 Expected<const Elf_Shdr *> SymTabOrErr = Obj.getSection(Sec.sh_link);
6507 StringRef ELFDumper<ELFT>::getPrintableSectionName(const Elf_Shdr &Sec) const {
6537 auto OnSectionStart = [&](const Elf_Shdr &Shdr) {
6555 uint64_t SymValue, std::optional<const Elf_Shdr *> FunctionSec) {
6598 if (Expected<const Elf_Shdr *> SecOrErr =
6621 uint64_t SymValue, std::optional<const Elf_Shdr *> FunctionSec,
6622 const Elf_Shdr &StackSizeSec, DataExtractor Data, uint64_t *Offset) {
6665 const Elf_Shdr &RelocSec, unsigned Ndx,
6666 const Elf_Shdr *SymTab,
6667 const Elf_Shdr *FunctionSec,
6668 const Elf_Shdr &StackSizeSec,
6684 Expected<const Elf_Shdr *> SectionOrErr =
6721 for (const Elf_Shdr &Sec : cantFail(Obj.sections())) {
6751 auto IsMatch = [&](const Elf_Shdr &Sec) -> bool {
6761 Expected<MapVector<const Elf_Shdr *, const Elf_Shdr *>>
6771 const Elf_Shdr *StackSizesELFSec = StackSizeMapEntry.first;
6772 const Elf_Shdr *RelocSec = StackSizeMapEntry.second;
6786 const Elf_Shdr *FunctionSec = unwrapOrError(
6798 const Elf_Shdr &Sec, const Elf_Shdr *SymTab) {
7188 for (const Elf_Shdr &Sec : cantFail(this->Obj.sections())) {
7223 void LLVMELFDumper<ELFT>::printRelocationSectionInfo(const Elf_Shdr &Sec,
7257 for (const Elf_Shdr &Sec : cantFail(this->Obj.sections())) {
7290 const Elf_Shdr *SymSec = unwrapOrError(
7548 void LLVMELFDumper<ELFT>::printVersionSymbolSection(const Elf_Shdr *Sec) {
7555 const Elf_Shdr *SymTabSec;
7582 void LLVMELFDumper<ELFT>::printVersionDefinitionSection(const Elf_Shdr *Sec) {
7607 void LLVMELFDumper<ELFT>::printVersionDependencySection(const Elf_Shdr *Sec) {
7709 auto IsMatch = [](const Elf_Shdr &Sec) -> bool {
7713 Expected<MapVector<const Elf_Shdr *, const Elf_Shdr *>> SecToRelocMapOrErr =
7722 const Elf_Shdr *CGSection = CGMapEntry.first;
7723 const Elf_Shdr *CGRelSection = CGMapEntry.second;
7761 using Elf_Shdr = typename ELFT::Shdr;
7762 auto IsMatch = [](const Elf_Shdr &Sec) -> bool {
7765 Expected<MapVector<const Elf_Shdr *, const Elf_Shdr *>> SecRelocMapOrErr =
7774 std::optional<const Elf_Shdr *> FunctionSec;
8087 for (const Elf_Shdr &Shdr : cantFail(this->Obj.sections())) {
8130 [](const Elf_Shdr &) {},
8323 void JSONELFDumper<ELFT>::printRelocationSectionInfo(const Elf_Shdr &Sec,