• Home
  • Raw
  • Download

Lines Matching refs:ELFT

51 #define TYPEDEF_ELF_TYPES(ELFT)                                                \  argument
52 typedef ELFFile<ELFT> ELFO; \
70 template <class ELFT> class DumpStyle;
97 template<typename ELFT>
100 ELFDumper(const ELFFile<ELFT> *Obj, ScopedPrinter &Writer);
130 std::unique_ptr<DumpStyle<ELFT>> ELFDumperStyle;
131 typedef ELFFile<ELFT> ELFO;
246 template <class ELFT>
247 void ELFDumper<ELFT>::printSymbolsHelper(bool IsDynamic) const { in printSymbolsHelper()
272 template <typename ELFT> class DumpStyle {
274 using Elf_Shdr = typename ELFFile<ELFT>::Elf_Shdr;
275 using Elf_Sym = typename ELFFile<ELFT>::Elf_Sym;
277 DumpStyle(ELFDumper<ELFT> *Dumper) : Dumper(Dumper) {} in DumpStyle()
279 virtual void printFileHeaders(const ELFFile<ELFT> *Obj) = 0;
280 virtual void printGroupSections(const ELFFile<ELFT> *Obj) = 0;
281 virtual void printRelocations(const ELFFile<ELFT> *Obj) = 0;
282 virtual void printSections(const ELFFile<ELFT> *Obj) = 0;
283 virtual void printSymbols(const ELFFile<ELFT> *Obj) = 0;
284 virtual void printDynamicSymbols(const ELFFile<ELFT> *Obj) = 0;
285 virtual void printDynamicRelocations(const ELFFile<ELFT> *Obj) = 0;
286 virtual void printSymtabMessage(const ELFFile<ELFT> *obj, StringRef Name, in printSymtabMessage()
290 virtual void printSymbol(const ELFFile<ELFT> *Obj, const Elf_Sym *Symbol,
293 virtual void printProgramHeaders(const ELFFile<ELFT> *Obj) = 0;
294 virtual void printHashHistogram(const ELFFile<ELFT> *Obj) = 0;
295 const ELFDumper<ELFT> *dumper() const { return Dumper; } in dumper()
297 const ELFDumper<ELFT> *Dumper;
300 template <typename ELFT> class GNUStyle : public DumpStyle<ELFT> {
303 TYPEDEF_ELF_TYPES(ELFT)
304 GNUStyle(ScopedPrinter &W, ELFDumper<ELFT> *Dumper) in GNUStyle()
305 : DumpStyle<ELFT>(Dumper), OS(W.getOStream()) {} in GNUStyle()
307 void printGroupSections(const ELFFile<ELFT> *Obj) override;
316 void printHashHistogram(const ELFFile<ELFT> *Obj) override;
354 template <typename ELFT> class LLVMStyle : public DumpStyle<ELFT> {
356 TYPEDEF_ELF_TYPES(ELFT)
357 LLVMStyle(ScopedPrinter &W, ELFDumper<ELFT> *Dumper) in LLVMStyle()
358 : DumpStyle<ELFT>(Dumper), W(W) {} in LLVMStyle()
361 void printGroupSections(const ELFFile<ELFT> *Obj) override;
369 void printHashHistogram(const ELFFile<ELFT> *Obj) override;
383 template <class ELFT>
384 static std::error_code createELFDumper(const ELFFile<ELFT> *Obj, in createELFDumper()
387 Result.reset(new ELFDumper<ELFT>(Obj, Writer)); in createELFDumper()
417 template <class ELFT>
418 void ELFDumper<ELFT>::LoadVersionNeeds(const Elf_Shdr *sec) const { in LoadVersionNeeds()
451 template <class ELFT>
452 void ELFDumper<ELFT>::LoadVersionDefs(const Elf_Shdr *sec) const { in LoadVersionDefs()
474 template <class ELFT> void ELFDumper<ELFT>::LoadVersionMap() const { in LoadVersionMap()
495 template <typename ELFO, class ELFT>
496 static void printVersionSymbolSection(ELFDumper<ELFT> *Dumper, const ELFO *Obj, in printVersionSymbolSection()
528 template <typename ELFO, class ELFT>
529 static void printVersionDefinitionSection(ELFDumper<ELFT> *Dumper, in printVersionDefinitionSection()
584 template <typename ELFO, class ELFT>
585 static void printVersionDependencySection(ELFDumper<ELFT> *Dumper, in printVersionDependencySection()
631 template <typename ELFT> void ELFDumper<ELFT>::printVersionInfo() { in printVersionInfo()
642 template <typename ELFT>
643 StringRef ELFDumper<ELFT>::getSymbolVersion(StringRef StrTab, in getSymbolVersion()
691 template <typename ELFT>
692 std::string ELFDumper<ELFT>::getFullSymbolName(const Elf_Sym *Symbol, in getFullSymbolName()
1306 template <typename ELFT>
1307 ELFDumper<ELFT>::ELFDumper(const ELFFile<ELFT> *Obj, ScopedPrinter &Writer) in ELFDumper()
1359 ELFDumperStyle.reset(new GNUStyle<ELFT>(Writer, this)); in ELFDumper()
1361 ELFDumperStyle.reset(new LLVMStyle<ELFT>(Writer, this)); in ELFDumper()
1364 template <typename ELFT>
1365 void ELFDumper<ELFT>::parseDynamicTable( in parseDynamicTable()
1369 LoadSegments.begin(), LoadSegments.end(), VAddr, compareAddr<ELFT>); in parseDynamicTable()
1447 template <typename ELFT>
1448 typename ELFDumper<ELFT>::Elf_Rel_Range ELFDumper<ELFT>::dyn_rels() const { in dyn_rels()
1452 template <typename ELFT>
1453 typename ELFDumper<ELFT>::Elf_Rela_Range ELFDumper<ELFT>::dyn_relas() const { in dyn_relas()
1457 template<class ELFT>
1458 void ELFDumper<ELFT>::printFileHeaders() { in printFileHeaders()
1462 template<class ELFT>
1463 void ELFDumper<ELFT>::printSections() { in printSections()
1467 template<class ELFT>
1468 void ELFDumper<ELFT>::printRelocations() { in printRelocations()
1472 template <class ELFT> void ELFDumper<ELFT>::printProgramHeaders() { in printProgramHeaders()
1476 template <class ELFT> void ELFDumper<ELFT>::printDynamicRelocations() { in printDynamicRelocations()
1480 template<class ELFT>
1481 void ELFDumper<ELFT>::printSymbols() { in printSymbols()
1485 template<class ELFT>
1486 void ELFDumper<ELFT>::printDynamicSymbols() { in printDynamicSymbols()
1490 template <class ELFT> void ELFDumper<ELFT>::printHashHistogram() { in printHashHistogram()
1638 template <class ELFT>
1639 StringRef ELFDumper<ELFT>::getDynamicString(uint64_t Value) const { in getDynamicString()
1645 template <class ELFT>
1646 void ELFDumper<ELFT>::printValue(uint64_t Type, uint64_t Value) { in printValue()
1732 template<class ELFT>
1733 void ELFDumper<ELFT>::printUnwindInfo() { in printUnwindInfo()
1749 template<class ELFT>
1750 void ELFDumper<ELFT>::printDynamicTable() { in printDynamicTable()
1771 bool Is64 = ELFT::Is64Bits; in printDynamicTable()
1789 template<class ELFT>
1790 void ELFDumper<ELFT>::printNeededLibraries() { in printNeededLibraries()
1808 template <typename ELFT>
1809 void ELFDumper<ELFT>::printHashTable() { in printHashTable()
1819 template <typename ELFT>
1820 void ELFDumper<ELFT>::printGnuHashTable() { in printGnuHashTable()
1837 template <typename ELFT> void ELFDumper<ELFT>::printLoadName() { in printLoadName()
1841 template <class ELFT>
1842 void ELFDumper<ELFT>::printAttributes() { in printAttributes()
1875 template <class ELFT> class MipsGOTParser {
1877 typedef object::ELFFile<ELFT> ELFO;
1885 MipsGOTParser(ELFDumper<ELFT> *Dumper, const ELFO *Obj,
1892 ELFDumper<ELFT> *Dumper;
1917 template <class ELFT>
1918 MipsGOTParser<ELFT>::MipsGOTParser(ELFDumper<ELFT> *Dumper, const ELFO *Obj, in MipsGOTParser()
1942 template <class ELFT> void MipsGOTParser<ELFT>::parseGOT() { in parseGOT()
2030 template <class ELFT> void MipsGOTParser<ELFT>::parsePLT() { in parsePLT()
2089 template <class ELFT>
2090 std::size_t MipsGOTParser<ELFT>::getGOTTotal(ArrayRef<uint8_t> GOT) const { in getGOTTotal()
2094 template <class ELFT>
2095 const typename MipsGOTParser<ELFT>::GOTEntry *
2096 MipsGOTParser<ELFT>::makeGOTIter(ArrayRef<uint8_t> GOT, std::size_t EntryNum) { in makeGOTIter()
2101 template <class ELFT>
2102 void MipsGOTParser<ELFT>::printGotEntry(uint64_t GotAddr, in printGotEntry()
2111 template <class ELFT>
2112 void MipsGOTParser<ELFT>::printGlobalGotEntry( in printGlobalGotEntry()
2131 template <class ELFT>
2132 void MipsGOTParser<ELFT>::printPLTEntry(uint64_t PLTAddr, in printPLTEntry()
2142 template <class ELFT>
2143 void MipsGOTParser<ELFT>::printPLTEntry(uint64_t PLTAddr, in printPLTEntry()
2164 template <class ELFT> void ELFDumper<ELFT>::printMipsPLTGOT() { in printMipsPLTGOT()
2170 MipsGOTParser<ELFT> GOTParser(this, Obj, dynamic_table(), W); in printMipsPLTGOT()
2246 template <class ELFT> void ELFDumper<ELFT>::printMipsABIFlags() { in printMipsABIFlags()
2253 if (Sec.size() != sizeof(Elf_Mips_ABIFlags<ELFT>)) { in printMipsABIFlags()
2258 auto *Flags = reinterpret_cast<const Elf_Mips_ABIFlags<ELFT> *>(Sec.data()); in printMipsABIFlags()
2280 template <class ELFT>
2282 const Elf_Mips_RegInfo<ELFT> &Reginfo) { in printMipsReginfoData()
2291 template <class ELFT> void ELFDumper<ELFT>::printMipsReginfo() { in printMipsReginfo()
2298 if (Sec.size() != sizeof(Elf_Mips_RegInfo<ELFT>)) { in printMipsReginfo()
2304 auto *Reginfo = reinterpret_cast<const Elf_Mips_RegInfo<ELFT> *>(Sec.data()); in printMipsReginfo()
2308 template <class ELFT> void ELFDumper<ELFT>::printMipsOptions() { in printMipsOptions()
2319 if (Sec.size() < sizeof(Elf_Mips_Options<ELFT>)) { in printMipsOptions()
2323 auto *O = reinterpret_cast<const Elf_Mips_Options<ELFT> *>(Sec.data()); in printMipsOptions()
2337 template <class ELFT> void ELFDumper<ELFT>::printStackMap() const { in printStackMap()
2354 prettyPrintStackMap(llvm::outs(), StackMapV1Parser<ELFT::TargetEndianness>( in printStackMap()
2358 template <class ELFT> void ELFDumper<ELFT>::printGroupSections() { in printGroupSections()
2371 template <class ELFT> void GNUStyle<ELFT>::printFileHeaders(const ELFO *Obj) { in printFileHeaders()
2423 template <class ELFT> void GNUStyle<ELFT>::printGroupSections(const ELFO *Obj) { in printGroupSections()
2454 template <class ELFT>
2455 void GNUStyle<ELFT>::printRelocation(const ELFO *Obj, const Elf_Shdr *SymTab, in printRelocation()
2462 unsigned Width = ELFT::Is64Bits ? 16 : 8; in printRelocation()
2463 unsigned Bias = ELFT::Is64Bits ? 8 : 0; in printRelocation()
2518 template <class ELFT> void GNUStyle<ELFT>::printRelocations(const ELFO *Obj) { in printRelocations()
2530 printRelocHeader(OS, ELFT::Is64Bits, (Sec.sh_type == ELF::SHT_RELA)); in printRelocations()
2633 template <class ELFT> void GNUStyle<ELFT>::printSections(const ELFO *Obj) { in printSections()
2640 if (ELFT::Is64Bits) { in printSections()
2712 template <class ELFT>
2713 void GNUStyle<ELFT>::printSymtabMessage(const ELFO *Obj, StringRef Name, in printSymtabMessage()
2721 if (ELFT::Is64Bits) in printSymtabMessage()
2727 template <class ELFT>
2728 std::string GNUStyle<ELFT>::getSymbolSectionNdx(const ELFO *Obj, in getSymbolSectionNdx()
2762 template <class ELFT>
2763 void GNUStyle<ELFT>::printSymbol(const ELFO *Obj, const Elf_Sym *Symbol, in printSymbol()
2779 if (ELFT::Is64Bits) { in printSymbol()
2815 template <class ELFT> void GNUStyle<ELFT>::printSymbols(const ELFO *Obj) { in printSymbols()
2820 template <class ELFT>
2821 void GNUStyle<ELFT>::printDynamicSymbols(const ELFO *Obj) { in printDynamicSymbols()
2835 template <class ELFT>
2836 bool GNUStyle<ELFT>::checkTLSSections(const Elf_Phdr &Phdr, in checkTLSSections()
2846 template <class ELFT>
2847 bool GNUStyle<ELFT>::checkoffsets(const Elf_Phdr &Phdr, const Elf_Shdr &Sec) { in checkoffsets()
2864 template <class ELFT>
2865 bool GNUStyle<ELFT>::checkVMA(const Elf_Phdr &Phdr, const Elf_Shdr &Sec) { in checkVMA()
2880 template <class ELFT>
2881 bool GNUStyle<ELFT>::checkPTDynamic(const Elf_Phdr &Phdr, const Elf_Shdr &Sec) { in checkPTDynamic()
2892 template <class ELFT>
2893 void GNUStyle<ELFT>::printProgramHeaders(const ELFO *Obj) { in printProgramHeaders()
2894 unsigned Bias = ELFT::Is64Bits ? 8 : 0; in printProgramHeaders()
2895 unsigned Width = ELFT::Is64Bits ? 18 : 10; in printProgramHeaders()
2896 unsigned SizeWidth = ELFT::Is64Bits ? 8 : 7; in printProgramHeaders()
2908 if (ELFT::Is64Bits) in printProgramHeaders()
2962 template <class ELFT>
2963 void GNUStyle<ELFT>::printDynamicRelocation(const ELFO *Obj, Elf_Rela R, in printDynamicRelocation()
2967 unsigned Width = ELFT::Is64Bits ? 16 : 8; in printDynamicRelocation()
2968 unsigned Bias = ELFT::Is64Bits ? 8 : 0; in printDynamicRelocation()
3008 template <class ELFT>
3009 void GNUStyle<ELFT>::printDynamicRelocations(const ELFO *Obj) { in printDynamicRelocations()
3018 printRelocHeader(OS, ELFT::Is64Bits, true); in printDynamicRelocations()
3027 printRelocHeader(OS, ELFT::Is64Bits, false); in printDynamicRelocations()
3043 printRelocHeader(OS, ELFT::Is64Bits, true); in printDynamicRelocations()
3047 printRelocHeader(OS, ELFT::Is64Bits, false); in printDynamicRelocations()
3062 template <class ELFT>
3063 void GNUStyle<ELFT>::printHashHistogram(const ELFFile<ELFT> *Obj) { in printHashHistogram()
3163 template <class ELFT> void LLVMStyle<ELFT>::printFileHeaders(const ELFO *Obj) { in printFileHeaders()
3207 template <class ELFT>
3208 void LLVMStyle<ELFT>::printGroupSections(const ELFO *Obj) { in printGroupSections()
3242 template <class ELFT> void LLVMStyle<ELFT>::printRelocations(const ELFO *Obj) { in printRelocations()
3264 template <class ELFT>
3265 void LLVMStyle<ELFT>::printRelocations(const Elf_Shdr *Sec, const ELFO *Obj) { in printRelocations()
3285 template <class ELFT>
3286 void LLVMStyle<ELFT>::printRelocation(const ELFO *Obj, Elf_Rela Rel, in printRelocation()
3316 template <class ELFT> void LLVMStyle<ELFT>::printSections(const ELFO *Obj) { in printSections()
3394 template <class ELFT>
3395 void LLVMStyle<ELFT>::printSymbol(const ELFO *Obj, const Elf_Sym *Symbol, in printSymbol()
3441 template <class ELFT> void LLVMStyle<ELFT>::printSymbols(const ELFO *Obj) { in printSymbols()
3446 template <class ELFT>
3447 void LLVMStyle<ELFT>::printDynamicSymbols(const ELFO *Obj) { in printDynamicSymbols()
3452 template <class ELFT>
3453 void LLVMStyle<ELFT>::printDynamicRelocations(const ELFO *Obj) { in printDynamicRelocations()
3487 template <class ELFT>
3488 void LLVMStyle<ELFT>::printDynamicRelocation(const ELFO *Obj, Elf_Rela Rel) { in printDynamicRelocation()
3510 template <class ELFT>
3511 void LLVMStyle<ELFT>::printProgramHeaders(const ELFO *Obj) { in printProgramHeaders()
3528 template <class ELFT>
3529 void LLVMStyle<ELFT>::printHashHistogram(const ELFFile<ELFT> *Obj) { in printHashHistogram()