Path: blob/main/contrib/llvm-project/llvm/tools/llvm-objdump/MachODump.h
35231 views
//===-- MachODump.h ---------------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_TOOLS_LLVM_OBJDUMP_MACHODUMP_H9#define LLVM_TOOLS_LLVM_OBJDUMP_MACHODUMP_H1011#include "llvm/ADT/SmallVector.h"12#include "llvm/Support/CommandLine.h"1314namespace llvm {1516class Error;17class StringRef;18class MemoryBuffer;1920namespace object {21class MachOObjectFile;22class MachOUniversalBinary;23class ObjectFile;24class RelocationRef;25class Binary;26} // namespace object2728namespace opt {29class InputArgList;30} // namespace opt3132namespace objdump {3334void parseMachOOptions(const llvm::opt::InputArgList &InputArgs);3536enum class FunctionStartsMode { Addrs, Names, Both, None };3738// MachO specific options39extern bool Bind;40extern bool DataInCode;41extern std::string DisSymName;42extern bool ChainedFixups;43extern bool DyldInfo;44extern bool DylibId;45extern bool DylibsUsed;46extern bool ExportsTrie;47extern bool FirstPrivateHeader;48extern bool FullLeadingAddr;49extern FunctionStartsMode FunctionStartsType;50extern bool IndirectSymbols;51extern bool InfoPlist;52extern bool LazyBind;53extern bool LeadingHeaders;54extern bool LinkOptHints;55extern bool ObjcMetaData;56extern bool Rebase;57extern bool Rpaths;58extern bool SymbolicOperands;59extern bool UniversalHeaders;60extern bool Verbose;61extern bool WeakBind;6263Error getMachORelocationValueString(const object::MachOObjectFile *Obj,64const object::RelocationRef &RelRef,65llvm::SmallVectorImpl<char> &Result);6667const object::MachOObjectFile *68getMachODSymObject(const object::MachOObjectFile *O, StringRef Filename,69std::unique_ptr<object::Binary> &DSYMBinary,70std::unique_ptr<MemoryBuffer> &DSYMBuf);7172void parseInputMachO(StringRef Filename);73void parseInputMachO(object::MachOUniversalBinary *UB);7475void printMachOUnwindInfo(const object::MachOObjectFile *O);76void printMachOFileHeader(const object::ObjectFile *O);77void printMachOLoadCommands(const object::ObjectFile *O);7879void printExportsTrie(const object::ObjectFile *O);80void printRebaseTable(object::ObjectFile *O);81void printBindTable(object::ObjectFile *O);82void printLazyBindTable(object::ObjectFile *O);83void printWeakBindTable(object::ObjectFile *O);8485} // namespace objdump86} // namespace llvm8788#endif899091