2011-09-19 17:56:04 +00:00
|
|
|
//===-- llvm-objdump.h ----------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_TOOLS_LLVM_OBJDUMP_LLVM_OBJDUMP_H
|
|
|
|
#define LLVM_TOOLS_LLVM_OBJDUMP_LLVM_OBJDUMP_H
|
2011-09-19 17:56:04 +00:00
|
|
|
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
|
|
|
#include "llvm/Support/CommandLine.h"
|
|
|
|
#include "llvm/Support/DataTypes.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
2012-12-05 20:12:35 +00:00
|
|
|
namespace object {
|
|
|
|
class COFFObjectFile;
|
2014-08-01 13:07:19 +00:00
|
|
|
class MachOObjectFile;
|
2013-01-06 03:56:49 +00:00
|
|
|
class ObjectFile;
|
2012-12-05 20:12:35 +00:00
|
|
|
class RelocationRef;
|
|
|
|
}
|
|
|
|
|
2011-09-19 17:56:04 +00:00
|
|
|
extern cl::opt<std::string> TripleName;
|
|
|
|
extern cl::opt<std::string> ArchName;
|
2014-08-06 23:24:41 +00:00
|
|
|
extern cl::opt<std::string> MCPU;
|
|
|
|
extern cl::list<std::string> MAttrs;
|
2015-01-31 00:37:11 +00:00
|
|
|
extern cl::list<std::string> DumpSections;
|
2015-01-07 21:02:18 +00:00
|
|
|
extern cl::opt<bool> Disassemble;
|
2014-09-24 23:08:22 +00:00
|
|
|
extern cl::opt<bool> NoShowRawInsn;
|
2015-01-07 21:02:18 +00: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-01-09 19:22:37 +00:00
|
|
|
extern cl::opt<bool> UniversalHeaders;
|
2015-01-15 23:19:11 +00:00
|
|
|
extern cl::opt<bool> ArchiveHeaders;
|
2015-01-22 18:55:27 +00:00
|
|
|
extern cl::opt<bool> IndirectSymbols;
|
2015-01-23 18:52:17 +00:00
|
|
|
extern cl::opt<bool> DataInCode;
|
2015-01-27 21:28:24 +00:00
|
|
|
extern cl::opt<bool> LinkOptHints;
|
2015-03-11 22:06:32 +00:00
|
|
|
extern cl::opt<bool> InfoPlist;
|
2015-03-16 20:08:09 +00:00
|
|
|
extern cl::opt<bool> DylibsUsed;
|
|
|
|
extern cl::opt<bool> DylibId;
|
2015-03-17 17:10:57 +00:00
|
|
|
extern cl::opt<std::string> DisSymName;
|
2015-03-13 17:56:32 +00:00
|
|
|
extern cl::opt<bool> NonVerbose;
|
2015-01-20 21:47:46 +00: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;
|
2011-09-19 17:56:04 +00:00
|
|
|
|
|
|
|
// Various helper functions.
|
2014-06-13 01:25:41 +00:00
|
|
|
bool error(std::error_code ec);
|
2012-12-05 20:12:35 +00:00
|
|
|
bool RelocAddressLess(object::RelocationRef a, object::RelocationRef b);
|
2015-03-18 19:27:31 +00:00
|
|
|
void DumpBytes(ArrayRef<uint8_t> bytes);
|
2015-01-07 21:02:18 +00:00
|
|
|
void ParseInputMachO(StringRef Filename);
|
2012-12-05 20:12:35 +00:00
|
|
|
void printCOFFUnwindInfo(const object::COFFObjectFile* o);
|
2014-08-01 13:07:19 +00:00
|
|
|
void printMachOUnwindInfo(const object::MachOObjectFile* o);
|
2014-08-30 00:20:14 +00:00
|
|
|
void printMachOExportsTrie(const object::MachOObjectFile* o);
|
2014-09-12 21:34:15 +00:00
|
|
|
void printMachORebaseTable(const object::MachOObjectFile* o);
|
2014-09-16 01:41:51 +00:00
|
|
|
void printMachOBindTable(const object::MachOObjectFile* o);
|
|
|
|
void printMachOLazyBindTable(const object::MachOObjectFile* o);
|
|
|
|
void printMachOWeakBindTable(const object::MachOObjectFile* o);
|
2013-01-06 03:56:49 +00:00
|
|
|
void printELFFileHeader(const object::ObjectFile *o);
|
2013-09-27 21:04:00 +00:00
|
|
|
void printCOFFFileHeader(const object::ObjectFile *o);
|
2014-08-22 20:35:18 +00:00
|
|
|
void printMachOFileHeader(const object::ObjectFile *o);
|
2015-01-07 21:02:18 +00: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-01-20 21:47:46 +00: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-19 17:56:04 +00:00
|
|
|
|
2013-09-27 21:04:00 +00:00
|
|
|
} // end namespace llvm
|
2011-09-19 17:56:04 +00:00
|
|
|
|
|
|
|
#endif
|