1 //===-- ObjDumper.h -------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_READOBJ_OBJDUMPER_H
11 #define LLVM_READOBJ_OBJDUMPER_H
27 ObjDumper(StreamWriter& Writer);
30 virtual void printFileHeaders() = 0;
31 virtual void printSections() = 0;
32 virtual void printRelocations() = 0;
33 virtual void printSymbols() = 0;
34 virtual void printDynamicSymbols() = 0;
35 virtual void printUnwindInfo() = 0;
37 // Only implemented for ELF at this time.
38 virtual void printDynamicTable() { }
39 virtual void printNeededLibraries() { }
40 virtual void printProgramHeaders() { }
42 // Only implemented for ARM ELF at this time.
43 virtual void printAttributes() { }
49 error_code createCOFFDumper(const object::ObjectFile *Obj, StreamWriter &Writer,
50 std::unique_ptr<ObjDumper> &Result);
52 error_code createELFDumper(const object::ObjectFile *Obj, StreamWriter &Writer,
53 std::unique_ptr<ObjDumper> &Result);
55 error_code createMachODumper(const object::ObjectFile *Obj,
57 std::unique_ptr<ObjDumper> &Result);