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