MachODump.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. #ifndef LLVM_TOOLS_LLVM_OBJDUMP_MACHODUMP_H
  9. #define LLVM_TOOLS_LLVM_OBJDUMP_MACHODUMP_H
  10. #include "llvm/ADT/SmallVector.h"
  11. #include "llvm/Support/CommandLine.h"
  12. namespace llvm {
  13. class Error;
  14. class StringRef;
  15. namespace object {
  16. class MachOObjectFile;
  17. class MachOUniversalBinary;
  18. class ObjectFile;
  19. class RelocationRef;
  20. } // namespace object
  21. namespace objdump {
  22. // MachO specific options
  23. extern cl::OptionCategory MachOCat;
  24. extern cl::opt<bool> Bind;
  25. extern cl::opt<bool> DataInCode;
  26. extern cl::opt<bool> DylibsUsed;
  27. extern cl::opt<bool> DylibId;
  28. extern cl::opt<bool> ExportsTrie;
  29. extern cl::opt<bool> FirstPrivateHeader;
  30. extern cl::opt<bool> IndirectSymbols;
  31. extern cl::opt<bool> InfoPlist;
  32. extern cl::opt<bool> LazyBind;
  33. extern cl::opt<bool> LinkOptHints;
  34. extern cl::opt<bool> ObjcMetaData;
  35. extern cl::opt<bool> Rebase;
  36. extern cl::opt<bool> UniversalHeaders;
  37. extern cl::opt<bool> WeakBind;
  38. Error getMachORelocationValueString(const object::MachOObjectFile *Obj,
  39. const object::RelocationRef &RelRef,
  40. llvm::SmallVectorImpl<char> &Result);
  41. void parseInputMachO(StringRef Filename);
  42. void parseInputMachO(object::MachOUniversalBinary *UB);
  43. void printMachOUnwindInfo(const object::MachOObjectFile *O);
  44. void printMachOFileHeader(const object::ObjectFile *O);
  45. void printMachOLoadCommands(const object::ObjectFile *O);
  46. void printExportsTrie(const object::ObjectFile *O);
  47. void printRebaseTable(object::ObjectFile *O);
  48. void printBindTable(object::ObjectFile *O);
  49. void printLazyBindTable(object::ObjectFile *O);
  50. void printWeakBindTable(object::ObjectFile *O);
  51. } // namespace objdump
  52. } // namespace llvm
  53. #endif