2011-09-20 01:56:04 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_TOOLS_LLVM_OBJDUMP_LLVM_OBJDUMP_H
|
|
|
|
#define LLVM_TOOLS_LLVM_OBJDUMP_LLVM_OBJDUMP_H
|
2011-09-20 01:56:04 +08:00
|
|
|
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
|
|
|
#include "llvm/Support/CommandLine.h"
|
|
|
|
#include "llvm/Support/DataTypes.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
2012-12-06 04:12:35 +08:00
|
|
|
namespace object {
|
|
|
|
class COFFObjectFile;
|
2014-08-01 21:07:19 +08:00
|
|
|
class MachOObjectFile;
|
2013-01-06 11:56:49 +08:00
|
|
|
class ObjectFile;
|
2012-12-06 04:12:35 +08:00
|
|
|
class RelocationRef;
|
|
|
|
}
|
|
|
|
|
2011-09-20 01:56:04 +08:00
|
|
|
extern cl::opt<std::string> TripleName;
|
|
|
|
extern cl::opt<std::string> ArchName;
|
2014-08-07 07:24:41 +08:00
|
|
|
extern cl::opt<std::string> MCPU;
|
|
|
|
extern cl::list<std::string> MAttrs;
|
2015-07-30 03:08:10 +08:00
|
|
|
extern cl::list<std::string> FilterSections;
|
2015-07-29 23:45:39 +08:00
|
|
|
extern cl::opt<bool> Disassemble;
|
2015-07-24 04:58:49 +08:00
|
|
|
extern cl::opt<bool> DisassembleAll;
|
2014-09-25 07:08:22 +08:00
|
|
|
extern cl::opt<bool> NoShowRawInsn;
|
2015-01-08 05:02:18 +08:00
|
|
|
extern cl::opt<bool> PrivateHeaders;
|
|
|
|
extern cl::opt<bool> ExportsTrie;
|
|
|
|
extern cl::opt<bool> Rebase;
|
|
|
|
extern cl::opt<bool> Bind;
|
|
|
|
extern cl::opt<bool> LazyBind;
|
|
|
|
extern cl::opt<bool> WeakBind;
|
2015-07-08 10:04:15 +08:00
|
|
|
extern cl::opt<bool> RawClangAST;
|
2015-01-10 03:22:37 +08:00
|
|
|
extern cl::opt<bool> UniversalHeaders;
|
2015-01-16 07:19:11 +08:00
|
|
|
extern cl::opt<bool> ArchiveHeaders;
|
2015-01-23 02:55:27 +08:00
|
|
|
extern cl::opt<bool> IndirectSymbols;
|
2015-01-24 02:52:17 +08:00
|
|
|
extern cl::opt<bool> DataInCode;
|
2015-01-28 05:28:24 +08:00
|
|
|
extern cl::opt<bool> LinkOptHints;
|
2015-03-12 06:06:32 +08:00
|
|
|
extern cl::opt<bool> InfoPlist;
|
2015-03-17 04:08:09 +08:00
|
|
|
extern cl::opt<bool> DylibsUsed;
|
|
|
|
extern cl::opt<bool> DylibId;
|
2015-04-02 04:57:01 +08:00
|
|
|
extern cl::opt<bool> ObjcMetaData;
|
2015-03-18 01:10:57 +08:00
|
|
|
extern cl::opt<std::string> DisSymName;
|
2015-03-14 01:56:32 +08:00
|
|
|
extern cl::opt<bool> NonVerbose;
|
2015-01-21 05:47:46 +08:00
|
|
|
extern cl::opt<bool> Relocations;
|
|
|
|
extern cl::opt<bool> SectionHeaders;
|
|
|
|
extern cl::opt<bool> SectionContents;
|
|
|
|
extern cl::opt<bool> SymbolTable;
|
|
|
|
extern cl::opt<bool> UnwindInfo;
|
2015-06-08 05:07:17 +08:00
|
|
|
extern cl::opt<bool> PrintImmHex;
|
2011-09-20 01:56:04 +08:00
|
|
|
|
|
|
|
// Various helper functions.
|
2015-08-05 15:18:31 +08:00
|
|
|
void error(std::error_code ec);
|
2012-12-06 04:12:35 +08:00
|
|
|
bool RelocAddressLess(object::RelocationRef a, object::RelocationRef b);
|
2015-01-08 05:02:18 +08:00
|
|
|
void ParseInputMachO(StringRef Filename);
|
2012-12-06 04:12:35 +08:00
|
|
|
void printCOFFUnwindInfo(const object::COFFObjectFile* o);
|
2014-08-01 21:07:19 +08:00
|
|
|
void printMachOUnwindInfo(const object::MachOObjectFile* o);
|
2014-08-30 08:20:14 +08:00
|
|
|
void printMachOExportsTrie(const object::MachOObjectFile* o);
|
2014-09-13 05:34:15 +08:00
|
|
|
void printMachORebaseTable(const object::MachOObjectFile* o);
|
2014-09-16 09:41:51 +08:00
|
|
|
void printMachOBindTable(const object::MachOObjectFile* o);
|
|
|
|
void printMachOLazyBindTable(const object::MachOObjectFile* o);
|
|
|
|
void printMachOWeakBindTable(const object::MachOObjectFile* o);
|
2013-01-06 11:56:49 +08:00
|
|
|
void printELFFileHeader(const object::ObjectFile *o);
|
2013-09-28 05:04:00 +08:00
|
|
|
void printCOFFFileHeader(const object::ObjectFile *o);
|
2014-08-23 04:35:18 +08:00
|
|
|
void printMachOFileHeader(const object::ObjectFile *o);
|
2015-01-08 05:02:18 +08:00
|
|
|
void printExportsTrie(const object::ObjectFile *o);
|
|
|
|
void printRebaseTable(const object::ObjectFile *o);
|
|
|
|
void printBindTable(const object::ObjectFile *o);
|
|
|
|
void printLazyBindTable(const object::ObjectFile *o);
|
|
|
|
void printWeakBindTable(const object::ObjectFile *o);
|
2015-07-08 10:04:15 +08:00
|
|
|
void printRawClangAST(const object::ObjectFile *o);
|
2015-01-21 05:47:46 +08:00
|
|
|
void PrintRelocations(const object::ObjectFile *o);
|
|
|
|
void PrintSectionHeaders(const object::ObjectFile *o);
|
|
|
|
void PrintSectionContents(const object::ObjectFile *o);
|
|
|
|
void PrintSymbolTable(const object::ObjectFile *o);
|
2011-09-20 01:56:04 +08:00
|
|
|
|
2013-09-28 05:04:00 +08:00
|
|
|
} // end namespace llvm
|
2011-09-20 01:56:04 +08:00
|
|
|
|
|
|
|
#endif
|