class MachOObjectFile

Declaration

class MachOObjectFile : public ObjectFile { /* full declaration omitted */ };

Description

This class is the base class for all object file types. Concrete instances of this object are created by createObjectFile, which figures out which type to create.

Declared at: llvm/include/llvm/Object/MachO.h:381

Inherits from: ObjectFile

Member Variables

private anonymous struct / union
private llvm::object::MachOObjectFile::SectionList Sections
private llvm::object::MachOObjectFile::LibraryList Libraries
private llvm::object::MachOObjectFile::LoadCommandList LoadCommands
private llvm::object::MachOObjectFile::BuildToolList BuildTools
private llvm::object::MachOObjectFile::LibraryShortName LibrariesShortNames
private std::unique_ptr<BindRebaseSegInfo> BindRebaseSectionTable
private const char* SymtabLoadCmd = nullptr
private const char* DysymtabLoadCmd = nullptr
private const char* DataInCodeLoadCmd = nullptr
private const char* LinkOptHintsLoadCmd = nullptr
private const char* DyldInfoLoadCmd = nullptr
private const char* FuncStartsLoadCmd = nullptr
private const char* DyldChainedFixupsLoadCmd = nullptr
private const char* UuidLoadCmd = nullptr
private bool HasPageZeroSegment = false

Inherited from Binary:

protected Data

Method Overview

Inherited from ObjectFile:

Inherited from SymbolicFile:

Inherited from Binary:

Methods

const char* BindEntryCheckSegAndOffsets(
    int32_t SegIndex,
    uint64_t SegOffset,
    uint8_t PointerSize,
    uint32_t Count = 1,
    uint32_t Skip = 0) const

Declared at: llvm/include/llvm/Object/MachO.h:547

Parameters

int32_t SegIndex
uint64_t SegOffset
uint8_t PointerSize
uint32_t Count = 1
uint32_t Skip = 0

uint64_t BindRebaseAddress(
    uint32_t SegIndex,
    uint64_t SegOffset) const

Description

For use with a SegIndex,SegOffset pair from a checked Mach-O Bind or Rebase entry to get the address.

Declared at: llvm/include/llvm/Object/MachO.h:583

Parameters

uint32_t SegIndex
uint64_t SegOffset

llvm::StringRef BindRebaseSectionName(
    uint32_t SegIndex,
    uint64_t SegOffset) const

Description

For use with a SegIndex,SegOffset pair from a checked Mach-O Bind or Rebase entry to get the section name.

Declared at: llvm/include/llvm/Object/MachO.h:577

Parameters

uint32_t SegIndex
uint64_t SegOffset

llvm::StringRef BindRebaseSegmentName(
    int32_t SegIndex) const

Description

For use with the SegIndex of a checked Mach-O Bind or Rebase entry to get the segment name.

Declared at: llvm/include/llvm/Object/MachO.h:571

Parameters

int32_t SegIndex

MachOObjectFile(llvm::MemoryBufferRef Object,
                bool IsLittleEndian,
                bool Is64Bits,
                llvm::Error& Err,
                uint32_t UniversalCputype = 0,
                uint32_t UniversalIndex = 0)

Declared at: llvm/include/llvm/Object/MachO.h:795

Parameters

llvm::MemoryBufferRef Object
bool IsLittleEndian
bool Is64Bits
llvm::Error& Err
uint32_t UniversalCputype = 0
uint32_t UniversalIndex = 0

void ReadULEB128s(
    uint64_t Index,
    SmallVectorImpl<uint64_t>& Out) const

Declared at: llvm/include/llvm/Object/MachO.h:698

Parameters

uint64_t Index
SmallVectorImpl<uint64_t>& Out

const char* RebaseEntryCheckSegAndOffsets(
    int32_t SegIndex,
    uint64_t SegOffset,
    uint8_t PointerSize,
    uint32_t Count = 1,
    uint32_t Skip = 0) const

Declared at: llvm/include/llvm/Object/MachO.h:560

Parameters

int32_t SegIndex
uint64_t SegOffset
uint8_t PointerSize
uint32_t Count = 1
uint32_t Skip = 0

llvm::object::dice_iterator begin_dices() const

Declared at: llvm/include/llvm/Object/MachO.h:497

llvm::object::MachOObjectFile::
    load_command_iterator
    begin_load_commands() const

Declared at: llvm/include/llvm/Object/MachO.h:500

iterator_range<llvm::object::bind_iterator>
bindTable(llvm::Error& Err)

Description

For use iterating over all bind table entries.

Declared at: llvm/include/llvm/Object/MachO.h:523

Parameters

llvm::Error& Err

static iterator_range<llvm::object::bind_iterator>
bindTable(llvm::Error& Err,
          llvm::object::MachOObjectFile* O,
          ArrayRef<uint8_t> Opcodes,
          bool is64,
          MachOBindEntry::Kind)

Description

For use examining bind opcodes in a MachOObjectFile.

Declared at: llvm/include/llvm/Object/MachO.h:535

Parameters

llvm::Error& Err
llvm::object::MachOObjectFile* O
ArrayRef<uint8_t> Opcodes
bool is64
MachOBindEntry::Kind

llvm::Error checkSymbolTable() const

Declared at: llvm/include/llvm/Object/MachO.h:402

static bool classof(const llvm::object::Binary* v)

Declared at: llvm/include/llvm/Object/MachO.h:720

Parameters

const llvm::object::Binary* v

static Expected<std::unique_ptr<MachOObjectFile>>
create(llvm::MemoryBufferRef Object,
       bool IsLittleEndian,
       bool Is64Bits,
       uint32_t UniversalCputype = 0,
       uint32_t UniversalIndex = 0)

Declared at: llvm/include/llvm/Object/MachO.h:391

Parameters

llvm::MemoryBufferRef Object
bool IsLittleEndian
bool Is64Bits
uint32_t UniversalCputype = 0
uint32_t UniversalIndex = 0

llvm::object::dice_iterator end_dices() const

Declared at: llvm/include/llvm/Object/MachO.h:498

llvm::object::MachOObjectFile::
    load_command_iterator
    end_load_commands() const

Declared at: llvm/include/llvm/Object/MachO.h:501

static iterator_range<
    llvm::object::export_iterator>
exports(llvm::Error& Err,
        ArrayRef<uint8_t> Trie,
        const llvm::object::MachOObjectFile* O =
            nullptr)

Description

For use examining a trie not in a MachOObjectFile.

Declared at: llvm/include/llvm/Object/MachO.h:508

Parameters

llvm::Error& Err
ArrayRef<uint8_t> Trie
const llvm::object::MachOObjectFile* O = nullptr

iterator_range<llvm::object::export_iterator>
exports(llvm::Error& Err) const

Description

For use iterating over all exported symbols.

Declared at: llvm/include/llvm/Object/MachO.h:505

Parameters

llvm::Error& Err

iterator_range<llvm::object::relocation_iterator>
external_relocations() const

Declared at: llvm/include/llvm/Object/MachO.h:452

llvm::object::relocation_iterator extrel_begin()
    const

Declared at: llvm/include/llvm/Object/MachO.h:450

llvm::object::relocation_iterator extrel_end()
    const

Declared at: llvm/include/llvm/Object/MachO.h:451

static Expected<std::vector<std::string>>
findDsymObjectMembers(llvm::StringRef Path)

Description

If the input path is a .dSYM bundle (as created by the dsymutil tool), return the paths to the object files found in the bundle, otherwise return an empty vector. If the path appears to be a .dSYM bundle but no objects were found or there was a filesystem error, then return an error.

Declared at: llvm/include/llvm/Object/MachO.h:792

Parameters

llvm::StringRef Path

iterator_range<llvm::object::fixup_iterator>
fixupTable(llvm::Error& Err)

Description

For iterating over all chained fixups.

Declared at: llvm/include/llvm/Object/MachO.h:526

Parameters

llvm::Error& Err

unsigned int getAnyRelocationAddress(
    const MachO::any_relocation_info& RE) const

Declared at: llvm/include/llvm/Object/MachO.h:608

Parameters

const MachO::any_relocation_info& RE

unsigned int getAnyRelocationLength(
    const MachO::any_relocation_info& RE) const

Declared at: llvm/include/llvm/Object/MachO.h:610

Parameters

const MachO::any_relocation_info& RE

unsigned int getAnyRelocationPCRel(
    const MachO::any_relocation_info& RE) const

Declared at: llvm/include/llvm/Object/MachO.h:609

Parameters

const MachO::any_relocation_info& RE

llvm::object::SectionRef getAnyRelocationSection(
    const MachO::any_relocation_info& RE) const

Declared at: llvm/include/llvm/Object/MachO.h:612

Parameters

const MachO::any_relocation_info& RE

unsigned int getAnyRelocationType(
    const MachO::any_relocation_info& RE) const

Declared at: llvm/include/llvm/Object/MachO.h:611

Parameters

const MachO::any_relocation_info& RE

Triple::ArchType getArch() const

Declared at: llvm/include/llvm/Object/MachO.h:490

static Triple::ArchType getArch(
    uint32_t CPUType,
    uint32_t CPUSubType)

Declared at: llvm/include/llvm/Object/MachO.h:703

Parameters

uint32_t CPUType
uint32_t CPUSubType

llvm::Triple getArchTriple(
    const char** McpuDefault = nullptr) const

Declared at: llvm/include/llvm/Object/MachO.h:492

Parameters

const char** McpuDefault = nullptr

static llvm::Triple getArchTriple(
    uint32_t CPUType,
    uint32_t CPUSubType,
    const char** McpuDefault = nullptr,
    const char** ArchFlag = nullptr)

Declared at: llvm/include/llvm/Object/MachO.h:704

Parameters

uint32_t CPUType
uint32_t CPUSubType
const char** McpuDefault = nullptr
const char** ArchFlag = nullptr

static std::string getBuildPlatform(
    uint32_t platform)

Declared at: llvm/include/llvm/Object/MachO.h:742

Parameters

uint32_t platform

static std::string getBuildTool(uint32_t tools)

Declared at: llvm/include/llvm/Object/MachO.h:762

Parameters

uint32_t tools

MachO::build_tool_version getBuildToolVersion(
    unsigned int index) const

Declared at: llvm/include/llvm/Object/MachO.h:637

Parameters

unsigned int index

MachO::build_version_command
getBuildVersionLoadCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:635

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

uint8_t getBytesInAddress() const

Description

The number of bytes used to represent an address in this object file format.

Declared at: llvm/include/llvm/Object/MachO.h:487

Expected<
    Optional<MachO::dyld_chained_fixups_header>>
getChainedFixupsHeader() const

Description

If the optional is None, no header was found, but the object was well-formed.

Declared at: llvm/include/llvm/Object/MachO.h:690

uint64_t getCommonSymbolSizeImpl(
    llvm::object::DataRefImpl Symb) const

Declared at: llvm/include/llvm/Object/MachO.h:409

Parameters

llvm::object::DataRefImpl Symb

MachO::linkedit_data_command
getDataInCodeLoadCommand() const

Declared at: llvm/include/llvm/Object/MachO.h:682

MachO::data_in_code_entry getDataInCodeTableEntry(
    uint32_t DataOffset,
    unsigned int Index) const

Declared at: llvm/include/llvm/Object/MachO.h:678

Parameters

uint32_t DataOffset
unsigned int Index

MachO::data_in_code_entry getDice(
    llvm::object::DataRefImpl Rel) const

Declared at: llvm/include/llvm/Object/MachO.h:672

Parameters

llvm::object::DataRefImpl Rel

Expected<std::vector<ChainedFixupTarget>>
getDyldChainedFixupTargets() const

Declared at: llvm/include/llvm/Object/MachO.h:691

ArrayRef<uint8_t> getDyldInfoBindOpcodes() const

Declared at: llvm/include/llvm/Object/MachO.h:685

ArrayRef<uint8_t> getDyldInfoExportsTrie() const

Declared at: llvm/include/llvm/Object/MachO.h:692

ArrayRef<uint8_t> getDyldInfoLazyBindOpcodes()
    const

Declared at: llvm/include/llvm/Object/MachO.h:687

MachO::dyld_info_command getDyldInfoLoadCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:641

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

ArrayRef<uint8_t> getDyldInfoRebaseOpcodes() const

Declared at: llvm/include/llvm/Object/MachO.h:684

ArrayRef<uint8_t> getDyldInfoWeakBindOpcodes()
    const

Declared at: llvm/include/llvm/Object/MachO.h:686

MachO::dylib_command getDylibIDLoadCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:639

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::dylinker_command getDylinkerCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:643

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::dysymtab_command getDysymtabLoadCommand()
    const

Declared at: llvm/include/llvm/Object/MachO.h:681

MachO::encryption_info_command
getEncryptionInfoCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:653

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::encryption_info_command_64
getEncryptionInfoCommand64(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:655

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::entry_point_command getEntryPointCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:651

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

llvm::SubtargetFeatures getFeatures() const

Declared at: llvm/include/llvm/Object/MachO.h:491

llvm::StringRef getFileFormatName() const

Declared at: llvm/include/llvm/Object/MachO.h:489

SmallVector<uint64_t> getFunctionStarts() const

Declared at: llvm/include/llvm/Object/MachO.h:693

const MachO::mach_header& getHeader() const

Declared at: llvm/include/llvm/Object/MachO.h:673

const MachO::mach_header_64& getHeader64() const

Declared at: llvm/include/llvm/Object/MachO.h:674

static llvm::Triple getHostArch()

Declared at: llvm/include/llvm/Object/MachO.h:709

std::error_code getIndirectName(
    llvm::object::DataRefImpl Symb,
    llvm::StringRef& Res) const

Declared at: llvm/include/llvm/Object/MachO.h:404

Parameters

llvm::object::DataRefImpl Symb
llvm::StringRef& Res

uint32_t getIndirectSymbolTableEntry(
    const MachO::dysymtab_command& DLC,
    unsigned int Index) const

Declared at: llvm/include/llvm/Object/MachO.h:676

Parameters

const MachO::dysymtab_command& DLC
unsigned int Index

uint32_t getLibraryCount() const

Declared at: llvm/include/llvm/Object/MachO.h:470

std::error_code getLibraryShortNameByIndex(
    unsigned int Index,
    llvm::StringRef&) const

Declared at: llvm/include/llvm/Object/MachO.h:469

Parameters

unsigned int Index
llvm::StringRef&

MachO::linkedit_data_command
getLinkOptHintsLoadCommand() const

Declared at: llvm/include/llvm/Object/MachO.h:683

MachO::linkedit_data_command
getLinkeditDataLoadCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:623

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::linker_option_command
getLinkerOptionLoadCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:629

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

uint64_t getNValue(
    llvm::object::DataRefImpl Sym) const

Declared at: llvm/include/llvm/Object/MachO.h:398

Parameters

llvm::object::DataRefImpl Sym

MachO::note_command getNoteLoadCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:633

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

bool getPlainRelocationExternal(
    const MachO::any_relocation_info& RE) const

Declared at: llvm/include/llvm/Object/MachO.h:601

Parameters

const MachO::any_relocation_info& RE

unsigned int getPlainRelocationSymbolNum(
    const MachO::any_relocation_info& RE) const

Declared at: llvm/include/llvm/Object/MachO.h:599

Parameters

const MachO::any_relocation_info& RE

MachO::any_relocation_info getRelocation(
    llvm::object::DataRefImpl Rel) const

Declared at: llvm/include/llvm/Object/MachO.h:671

Parameters

llvm::object::DataRefImpl Rel

uint8_t getRelocationLength(
    llvm::object::DataRefImpl Rel) const

Declared at: llvm/include/llvm/Object/MachO.h:466

Parameters

llvm::object::DataRefImpl Rel

uint64_t getRelocationOffset(
    llvm::object::DataRefImpl Rel) const

Declared at: llvm/include/llvm/Object/MachO.h:460

Parameters

llvm::object::DataRefImpl Rel

llvm::object::section_iterator
getRelocationRelocatedSection(
    llvm::object::relocation_iterator Rel) const

Declared at: llvm/include/llvm/Object/MachO.h:472

Parameters

llvm::object::relocation_iterator Rel

llvm::object::section_iterator
getRelocationSection(
    llvm::object::DataRefImpl Rel) const

Declared at: llvm/include/llvm/Object/MachO.h:462

Parameters

llvm::object::DataRefImpl Rel

llvm::object::symbol_iterator getRelocationSymbol(
    llvm::object::DataRefImpl Rel) const

Declared at: llvm/include/llvm/Object/MachO.h:461

Parameters

llvm::object::DataRefImpl Rel

uint64_t getRelocationType(
    llvm::object::DataRefImpl Rel) const

Declared at: llvm/include/llvm/Object/MachO.h:463

Parameters

llvm::object::DataRefImpl Rel

void getRelocationTypeName(
    llvm::object::DataRefImpl Rel,
    SmallVectorImpl<char>& Result) const

Declared at: llvm/include/llvm/Object/MachO.h:464

Parameters

llvm::object::DataRefImpl Rel
SmallVectorImpl<char>& Result

MachO::routines_command getRoutinesCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:665

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::routines_command_64 getRoutinesCommand64(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:667

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::rpath_command getRpathCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:647

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

bool getScatteredRelocationScattered(
    const MachO::any_relocation_info& RE) const

Declared at: llvm/include/llvm/Object/MachO.h:602

Parameters

const MachO::any_relocation_info& RE

uint32_t getScatteredRelocationType(
    const MachO::any_relocation_info& RE) const

Declared at: llvm/include/llvm/Object/MachO.h:606

Parameters

const MachO::any_relocation_info& RE

uint32_t getScatteredRelocationValue(
    const MachO::any_relocation_info& RE) const

Declared at: llvm/include/llvm/Object/MachO.h:604

Parameters

const MachO::any_relocation_info& RE

Expected<llvm::object::SectionRef> getSection(
    unsigned int SectionIndex) const

Declared at: llvm/include/llvm/Object/MachO.h:425

Parameters

unsigned int SectionIndex

MachO::section getSection(
    llvm::object::DataRefImpl DRI) const

Declared at: llvm/include/llvm/Object/MachO.h:615

Parameters

llvm::object::DataRefImpl DRI

MachO::section getSection(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L,
    unsigned int Index) const

Declared at: llvm/include/llvm/Object/MachO.h:617

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L
unsigned int Index

Expected<llvm::object::SectionRef> getSection(
    llvm::StringRef SectionName) const

Declared at: llvm/include/llvm/Object/MachO.h:426

Parameters

llvm::StringRef SectionName

MachO::section_64 getSection64(
    llvm::object::DataRefImpl DRI) const

Declared at: llvm/include/llvm/Object/MachO.h:616

Parameters

llvm::object::DataRefImpl DRI

MachO::section_64 getSection64(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L,
    unsigned int Index) const

Declared at: llvm/include/llvm/Object/MachO.h:618

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L
unsigned int Index

uint64_t getSectionAddress(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:418

Parameters

llvm::object::DataRefImpl Sec

uint64_t getSectionAlignment(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:424

Parameters

llvm::object::DataRefImpl Sec

Expected<ArrayRef<uint8_t>> getSectionContents(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:423

Parameters

llvm::object::DataRefImpl Sec

ArrayRef<uint8_t> getSectionContents(
    uint32_t Offset,
    uint64_t Size) const

Declared at: llvm/include/llvm/Object/MachO.h:421

Parameters

uint32_t Offset
uint64_t Size

llvm::StringRef getSectionFinalSegmentName(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:590

Parameters

llvm::object::DataRefImpl Sec

unsigned int getSectionID(
    llvm::object::SectionRef Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:414

Parameters

llvm::object::SectionRef Sec

uint64_t getSectionIndex(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:419

Parameters

llvm::object::DataRefImpl Sec

Expected<llvm::StringRef> getSectionName(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:417

Parameters

llvm::object::DataRefImpl Sec

ArrayRef<char> getSectionRawFinalSegmentName(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:595

Parameters

llvm::object::DataRefImpl Sec

ArrayRef<char> getSectionRawName(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:594

Parameters

llvm::object::DataRefImpl Sec

uint64_t getSectionSize(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:420

Parameters

llvm::object::DataRefImpl Sec

unsigned int getSectionType(
    llvm::object::SectionRef Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:405

Parameters

llvm::object::SectionRef Sec

MachO::segment_command_64 getSegment64LoadCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:627

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

ArrayRef<uint8_t> getSegmentContents(
    llvm::StringRef SegmentName) const

Description

Return the raw contents of an entire segment.

Declared at: llvm/include/llvm/Object/MachO.h:436

Parameters

llvm::StringRef SegmentName

MachO::segment_command getSegmentLoadCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:625

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::source_version_command
getSourceVersionCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:649

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

llvm::StringRef getStringTableData() const

Declared at: llvm/include/llvm/Object/MachO.h:696

MachO::sub_client_command getSubClientCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:663

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::sub_framework_command
getSubFrameworkCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:657

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::sub_library_command getSubLibraryCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:661

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::sub_umbrella_command getSubUmbrellaCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:659

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

MachO::nlist_64 getSymbol64TableEntry(
    llvm::object::DataRefImpl DRI) const

Declared at: llvm/include/llvm/Object/MachO.h:620

Parameters

llvm::object::DataRefImpl DRI

Expected<uint64_t> getSymbolAddress(
    llvm::object::DataRefImpl Symb) const

Declared at: llvm/include/llvm/Object/MachO.h:407

Parameters

llvm::object::DataRefImpl Symb

uint32_t getSymbolAlignment(
    llvm::object::DataRefImpl Symb) const

Declared at: llvm/include/llvm/Object/MachO.h:408

Parameters

llvm::object::DataRefImpl Symb

llvm::object::symbol_iterator getSymbolByIndex(
    unsigned int Index) const

Declared at: llvm/include/llvm/Object/MachO.h:481

Parameters

unsigned int Index

Expected<uint32_t> getSymbolFlags(
    llvm::object::DataRefImpl Symb) const

Declared at: llvm/include/llvm/Object/MachO.h:411

Parameters

llvm::object::DataRefImpl Symb

uint64_t getSymbolIndex(
    llvm::object::DataRefImpl Symb) const

Declared at: llvm/include/llvm/Object/MachO.h:482

Parameters

llvm::object::DataRefImpl Symb

Expected<llvm::StringRef> getSymbolName(
    llvm::object::DataRefImpl Symb) const

Declared at: llvm/include/llvm/Object/MachO.h:399

Parameters

llvm::object::DataRefImpl Symb

Expected<llvm::object::section_iterator>
getSymbolSection(
    llvm::object::DataRefImpl Symb) const

Declared at: llvm/include/llvm/Object/MachO.h:412

Parameters

llvm::object::DataRefImpl Symb

unsigned int getSymbolSectionID(
    llvm::object::SymbolRef Symb) const

Declared at: llvm/include/llvm/Object/MachO.h:413

Parameters

llvm::object::SymbolRef Symb

MachO::nlist getSymbolTableEntry(
    llvm::object::DataRefImpl DRI) const

Declared at: llvm/include/llvm/Object/MachO.h:619

Parameters

llvm::object::DataRefImpl DRI

Expected<SymbolRef::Type> getSymbolType(
    llvm::object::DataRefImpl Symb) const

Declared at: llvm/include/llvm/Object/MachO.h:410

Parameters

llvm::object::DataRefImpl Symb

uint64_t getSymbolValueImpl(
    llvm::object::DataRefImpl Symb) const

Declared at: llvm/include/llvm/Object/MachO.h:799

Parameters

llvm::object::DataRefImpl Symb

MachO::symtab_command getSymtabLoadCommand() const

Declared at: llvm/include/llvm/Object/MachO.h:680

MachO::thread_command getThreadCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:669

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

ArrayRef<uint8_t> getUuid() const

Declared at: llvm/include/llvm/Object/MachO.h:694

MachO::uuid_command getUuidCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:645

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

static ArrayRef<llvm::StringRef> getValidArchs()

Declared at: llvm/include/llvm/Object/MachO.h:708

MachO::version_min_command
getVersionMinLoadCommand(
    const llvm::object::MachOObjectFile::
        LoadCommandInfo& L) const

Declared at: llvm/include/llvm/Object/MachO.h:631

Parameters

const llvm::object::MachOObjectFile:: LoadCommandInfo& L

static uint32_t getVersionMinMajor(
    MachO::version_min_command& C,
    bool SDK)

Declared at: llvm/include/llvm/Object/MachO.h:725

Parameters

MachO::version_min_command& C
bool SDK

static uint32_t getVersionMinMinor(
    MachO::version_min_command& C,
    bool SDK)

Declared at: llvm/include/llvm/Object/MachO.h:731

Parameters

MachO::version_min_command& C
bool SDK

static uint32_t getVersionMinUpdate(
    MachO::version_min_command& C,
    bool SDK)

Declared at: llvm/include/llvm/Object/MachO.h:737

Parameters

MachO::version_min_command& C
bool SDK

static std::string getVersionString(
    uint32_t version)

Declared at: llvm/include/llvm/Object/MachO.h:775

Parameters

uint32_t version

static llvm::StringRef guessLibraryShortName(
    llvm::StringRef Name,
    bool& isFramework,
    llvm::StringRef& Suffix)

Declared at: llvm/include/llvm/Object/MachO.h:700

Parameters

llvm::StringRef Name
bool& isFramework
llvm::StringRef& Suffix

bool hasPageZeroSegment() const

Declared at: llvm/include/llvm/Object/MachO.h:718

bool is64Bit() const

Declared at: llvm/include/llvm/Object/MachO.h:697

bool isDebugSection(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:433

Parameters

llvm::object::DataRefImpl Sec

static bool isMachOPairedReloc(uint64_t RelocType,
                               uint64_t Arch)

Declared at: llvm/include/llvm/Object/MachO.h:394

Parameters

uint64_t RelocType
uint64_t Arch

bool isRelocatableObject() const

Description

True if this is a relocatable object (.o/.obj).

Declared at: llvm/include/llvm/Object/MachO.h:711

bool isRelocationScattered(
    const MachO::any_relocation_info& RE) const

Declared at: llvm/include/llvm/Object/MachO.h:598

Parameters

const MachO::any_relocation_info& RE

bool isSectionBSS(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:430

Parameters

llvm::object::DataRefImpl Sec

bool isSectionBitcode(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:432

Parameters

llvm::object::DataRefImpl Sec

bool isSectionCompressed(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:427

Parameters

llvm::object::DataRefImpl Sec

bool isSectionData(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:429

Parameters

llvm::object::DataRefImpl Sec

bool isSectionStripped(
    llvm::object::DataRefImpl Sec) const

Description

When dsymutil generates the companion file, it strips all unnecessary sections (e.g. everything in the _TEXT segment) by omitting their body and setting the offset in their corresponding load command to zero. While the load command itself is valid, reading the section corresponds to reading the number of bytes specified in the load command, starting from offset 0 (i.e. the Mach-O header at the beginning of the file).

Declared at: llvm/include/llvm/Object/MachO.h:445

Parameters

llvm::object::DataRefImpl Sec

bool isSectionText(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:428

Parameters

llvm::object::DataRefImpl Sec

bool isSectionVirtual(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:431

Parameters

llvm::object::DataRefImpl Sec

static bool isValidArch(llvm::StringRef ArchFlag)

Declared at: llvm/include/llvm/Object/MachO.h:707

Parameters

llvm::StringRef ArchFlag

iterator_range<llvm::object::bind_iterator>
lazyBindTable(llvm::Error& Err)

Description

For use iterating over all lazy bind table entries.

Declared at: llvm/include/llvm/Object/MachO.h:529

Parameters

llvm::Error& Err

iterator_range<llvm::object::MachOObjectFile::
                   load_command_iterator>
load_commands() const

Declared at: llvm/include/llvm/Object/MachO.h:502

llvm::object::relocation_iterator locrel_begin()
    const

Declared at: llvm/include/llvm/Object/MachO.h:456

llvm::object::relocation_iterator locrel_end()
    const

Declared at: llvm/include/llvm/Object/MachO.h:457

llvm::StringRef mapDebugSectionName(
    llvm::StringRef Name) const

Description

Maps a debug section name to a standard DWARF section name.

Declared at: llvm/include/llvm/Object/MachO.h:713

Parameters

llvm::StringRef Name

llvm::binaryformat::Swift5ReflectionSectionKind
mapReflectionSectionNameToEnumValue(
    llvm::StringRef SectionName) const

Declared at: llvm/include/llvm/Object/MachO.h:716

Parameters

llvm::StringRef SectionName

void moveRelocationNext(
    llvm::object::DataRefImpl& Rel) const

Declared at: llvm/include/llvm/Object/MachO.h:459

Parameters

llvm::object::DataRefImpl& Rel

void moveSectionNext(
    llvm::object::DataRefImpl& Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:416

Parameters

llvm::object::DataRefImpl& Sec

void moveSymbolNext(
    llvm::object::DataRefImpl& Symb) const

Declared at: llvm/include/llvm/Object/MachO.h:396

Parameters

llvm::object::DataRefImpl& Symb

iterator_range<llvm::object::rebase_iterator>
rebaseTable(llvm::Error& Err)

Description

For use iterating over all rebase table entries.

Declared at: llvm/include/llvm/Object/MachO.h:514

Parameters

llvm::Error& Err

static iterator_range<
    llvm::object::rebase_iterator>
rebaseTable(llvm::Error& Err,
            llvm::object::MachOObjectFile* O,
            ArrayRef<uint8_t> Opcodes,
            bool is64)

Description

For use examining rebase opcodes in a MachOObjectFile.

Declared at: llvm/include/llvm/Object/MachO.h:517

Parameters

llvm::Error& Err
llvm::object::MachOObjectFile* O
ArrayRef<uint8_t> Opcodes
bool is64

llvm::object::section_iterator section_begin()
    const

Declared at: llvm/include/llvm/Object/MachO.h:484

llvm::object::section_iterator section_end() const

Declared at: llvm/include/llvm/Object/MachO.h:485

llvm::object::relocation_iterator
section_rel_begin(unsigned int Index) const

Declared at: llvm/include/llvm/Object/MachO.h:494

Parameters

unsigned int Index

llvm::object::relocation_iterator
section_rel_begin(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:447

Parameters

llvm::object::DataRefImpl Sec

llvm::object::relocation_iterator section_rel_end(
    unsigned int Index) const

Declared at: llvm/include/llvm/Object/MachO.h:495

Parameters

unsigned int Index

llvm::object::relocation_iterator section_rel_end(
    llvm::object::DataRefImpl Sec) const

Declared at: llvm/include/llvm/Object/MachO.h:448

Parameters

llvm::object::DataRefImpl Sec

llvm::object::basic_symbol_iterator symbol_begin()
    const

Declared at: llvm/include/llvm/Object/MachO.h:477

llvm::object::basic_symbol_iterator symbol_end()
    const

Declared at: llvm/include/llvm/Object/MachO.h:478

iterator_range<llvm::object::bind_iterator>
weakBindTable(llvm::Error& Err)

Description

For use iterating over all weak bind table entries.

Declared at: llvm/include/llvm/Object/MachO.h:532

Parameters

llvm::Error& Err