Lines Matching refs:ELFT
28 template <typename ELFT> class ELFDumper : public Dumper {
30 ELFDumper(const ELFObjectFile<ELFT> &O) : Dumper(O), Obj(O) {} in ELFDumper()
35 const ELFObjectFile<ELFT> &Obj;
37 const ELFFile<ELFT> &getELFFile() const { return Obj.getELFFile(); } in getELFFile()
41 void printSymbolVersionDependency(const typename ELFT::Shdr &Sec);
45 template <class ELFT>
46 static std::unique_ptr<Dumper> createDumper(const ELFObjectFile<ELFT> &Obj) { in createDumper()
47 return std::make_unique<ELFDumper<ELFT>>(Obj); in createDumper()
61 template <class ELFT>
62 static Expected<StringRef> getDynamicStrTab(const ELFFile<ELFT> &Elf) { in getDynamicStrTab()
67 for (const typename ELFT::Dyn &Dyn : *DynamicEntriesOrError) { in getDynamicStrTab()
81 for (const typename ELFT::Shdr &Sec : *SectionsOrError) { in getDynamicStrTab()
89 template <class ELFT>
90 static Error getRelocationValueString(const ELFObjectFile<ELFT> *Obj, in getRelocationValueString()
93 const ELFFile<ELFT> &EF = Obj->getELFFile(); in getRelocationValueString()
112 const typename ELFT::Rela *ERela = Obj->getRela(Rel); in getRelocationValueString()
116 const typename ELFT::Rel *ERel = Obj->getRel(Rel); in getRelocationValueString()
129 Expected<const typename ELFT::Sym *> SymOrErr = in getRelocationValueString()
139 const typename ELFT::Shdr *SymSec = in getRelocationValueString()
178 template <class ELFT>
179 static uint64_t getSectionLMA(const ELFFile<ELFT> &Obj, in getSectionLMA()
187 for (const typename ELFT::Phdr &Phdr : *PhdrRangeOrErr) in getSectionLMA()
189 (isSectionInSegment<ELFT>( in getSectionLMA()
190 Phdr, *cast<const ELFObjectFile<ELFT>>(Sec.getObject()) in getSectionLMA()
209 template <class ELFT> void ELFDumper<ELFT>::printDynamicSection() { in printDynamicSection()
210 const ELFFile<ELFT> &Elf = getELFFile(); in printDynamicSection()
216 ArrayRef<typename ELFT::Dyn> DynamicEntries = *DynamicEntriesOrErr; in printDynamicSection()
220 for (const typename ELFT::Dyn &Dyn : DynamicEntries) in printDynamicSection()
225 for (const typename ELFT::Dyn &Dyn : DynamicEntries) { in printDynamicSection()
232 ELFT::Is64Bits ? "0x%016" PRIx64 "\n" : "0x%08" PRIx64 "\n"; in printDynamicSection()
251 template <class ELFT> void ELFDumper<ELFT>::printProgramHeaders() { in printProgramHeaders()
261 for (const typename ELFT::Phdr &Phdr : *ProgramHeaderOrError) { in printProgramHeaders()
315 const char *Fmt = ELFT::Is64Bits ? "0x%016" PRIx64 " " : "0x%08" PRIx64 " "; in printProgramHeaders()
329 template <typename ELFT> void ELFDumper<ELFT>::printDynamicRelocations() { in printDynamicRelocations()
362 template <class ELFT>
363 void ELFDumper<ELFT>::printSymbolVersionDependency( in printSymbolVersionDependency()
364 const typename ELFT::Shdr &Sec) { in printSymbolVersionDependency()
382 template <class ELFT>
383 static void printSymbolVersionDefinition(const typename ELFT::Shdr &Shdr, in printSymbolVersionDefinition()
395 auto *Verdef = reinterpret_cast<const typename ELFT::Verdef *>(Buf); in printSymbolVersionDefinition()
403 auto *Verdaux = reinterpret_cast<const typename ELFT::Verdaux *>(BufAux); in printSymbolVersionDefinition()
414 template <class ELFT> void ELFDumper<ELFT>::printSymbolVersion() { in printSymbolVersion()
415 const ELFFile<ELFT> &Elf = getELFFile(); in printSymbolVersion()
417 ArrayRef<typename ELFT::Shdr> Sections = in printSymbolVersion()
419 for (const typename ELFT::Shdr &Shdr : Sections) { in printSymbolVersion()
426 const typename ELFT::Shdr *StrTabSec = in printSymbolVersion()
433 printSymbolVersionDefinition<ELFT>(Shdr, Contents, StrTab); in printSymbolVersion()
437 template <class ELFT> void ELFDumper<ELFT>::printPrivateHeaders() { in printPrivateHeaders()