Hubert Tong | 076308a | 2020-04-06 16:56:13 -0400 | [diff] [blame] | 1 | //===-- MachODump.h ---------------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef LLVM_TOOLS_LLVM_OBJDUMP_MACHODUMP_H |
| 10 | #define LLVM_TOOLS_LLVM_OBJDUMP_MACHODUMP_H |
| 11 | |
Hubert Tong | c6f13ce | 2020-04-09 15:32:09 -0400 | [diff] [blame] | 12 | #include "llvm/ADT/SmallVector.h" |
Hubert Tong | 076308a | 2020-04-06 16:56:13 -0400 | [diff] [blame] | 13 | #include "llvm/Support/CommandLine.h" |
| 14 | |
| 15 | namespace llvm { |
Hubert Tong | c6f13ce | 2020-04-09 15:32:09 -0400 | [diff] [blame] | 16 | |
| 17 | class Error; |
| 18 | class StringRef; |
| 19 | |
| 20 | namespace object { |
| 21 | class MachOObjectFile; |
| 22 | class MachOUniversalBinary; |
| 23 | class ObjectFile; |
| 24 | class RelocationRef; |
| 25 | } // namespace object |
| 26 | |
Hubert Tong | 076308a | 2020-04-06 16:56:13 -0400 | [diff] [blame] | 27 | namespace objdump { |
| 28 | |
| 29 | // MachO specific options |
| 30 | extern cl::OptionCategory MachOCat; |
| 31 | extern cl::opt<bool> Bind; |
| 32 | extern cl::opt<bool> DataInCode; |
| 33 | extern cl::opt<bool> DylibsUsed; |
| 34 | extern cl::opt<bool> DylibId; |
| 35 | extern cl::opt<bool> ExportsTrie; |
| 36 | extern cl::opt<bool> FirstPrivateHeader; |
| 37 | extern cl::opt<bool> IndirectSymbols; |
| 38 | extern cl::opt<bool> InfoPlist; |
| 39 | extern cl::opt<bool> LazyBind; |
| 40 | extern cl::opt<bool> LinkOptHints; |
| 41 | extern cl::opt<bool> ObjcMetaData; |
| 42 | extern cl::opt<bool> Rebase; |
| 43 | extern cl::opt<bool> UniversalHeaders; |
| 44 | extern cl::opt<bool> WeakBind; |
| 45 | |
Hubert Tong | c6f13ce | 2020-04-09 15:32:09 -0400 | [diff] [blame] | 46 | Error getMachORelocationValueString(const object::MachOObjectFile *Obj, |
| 47 | const object::RelocationRef &RelRef, |
| 48 | llvm::SmallVectorImpl<char> &Result); |
| 49 | |
| 50 | void parseInputMachO(StringRef Filename); |
| 51 | void parseInputMachO(object::MachOUniversalBinary *UB); |
| 52 | |
| 53 | void printMachOUnwindInfo(const object::MachOObjectFile *O); |
| 54 | void printMachOFileHeader(const object::ObjectFile *O); |
| 55 | void printMachOLoadCommands(const object::ObjectFile *O); |
| 56 | |
| 57 | void printExportsTrie(const object::ObjectFile *O); |
| 58 | void printRebaseTable(object::ObjectFile *O); |
| 59 | void printBindTable(object::ObjectFile *O); |
| 60 | void printLazyBindTable(object::ObjectFile *O); |
| 61 | void printWeakBindTable(object::ObjectFile *O); |
| 62 | |
Hubert Tong | 076308a | 2020-04-06 16:56:13 -0400 | [diff] [blame] | 63 | } // namespace objdump |
| 64 | } // namespace llvm |
| 65 | |
| 66 | #endif |