MachODump.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 opt {
  22. class InputArgList;
  23. } // namespace opt
  24. namespace objdump {
  25. void parseMachOOptions(const llvm::opt::InputArgList &InputArgs);
  26. // MachO specific options
  27. extern bool Bind;
  28. extern bool DataInCode;
  29. extern std::string DisSymName;
  30. extern bool DylibId;
  31. extern bool DylibsUsed;
  32. extern bool ExportsTrie;
  33. extern bool FirstPrivateHeader;
  34. extern bool FullLeadingAddr;
  35. extern bool FunctionStarts;
  36. extern bool IndirectSymbols;
  37. extern bool InfoPlist;
  38. extern bool LazyBind;
  39. extern bool LeadingHeaders;
  40. extern bool LinkOptHints;
  41. extern bool ObjcMetaData;
  42. extern bool Rebase;
  43. extern bool Rpaths;
  44. extern bool SymbolicOperands;
  45. extern bool UniversalHeaders;
  46. extern bool Verbose;
  47. extern bool WeakBind;
  48. Error getMachORelocationValueString(const object::MachOObjectFile *Obj,
  49. const object::RelocationRef &RelRef,
  50. llvm::SmallVectorImpl<char> &Result);
  51. void parseInputMachO(StringRef Filename);
  52. void parseInputMachO(object::MachOUniversalBinary *UB);
  53. void printMachOUnwindInfo(const object::MachOObjectFile *O);
  54. void printMachOFileHeader(const object::ObjectFile *O);
  55. void printMachOLoadCommands(const object::ObjectFile *O);
  56. void printExportsTrie(const object::ObjectFile *O);
  57. void printRebaseTable(object::ObjectFile *O);
  58. void printBindTable(object::ObjectFile *O);
  59. void printLazyBindTable(object::ObjectFile *O);
  60. void printWeakBindTable(object::ObjectFile *O);
  61. } // namespace objdump
  62. } // namespace llvm
  63. #endif