LLVM
15.0.0git
|
#include "llvm/Object/MachO.h"
Classes | |
struct | LoadCommandInfo |
Public Types | |
using | LoadCommandList = SmallVector< LoadCommandInfo, 4 > |
using | load_command_iterator = LoadCommandList::const_iterator |
![]() | |
using | symbol_iterator_range = iterator_range< symbol_iterator > |
using | section_iterator_range = iterator_range< section_iterator > |
![]() | |
using | basic_symbol_iterator_range = iterator_range< basic_symbol_iterator > |
Static Public Member Functions | |
static Expected< std::unique_ptr< MachOObjectFile > > | create (MemoryBufferRef Object, bool IsLittleEndian, bool Is64Bits, uint32_t UniversalCputype=0, uint32_t UniversalIndex=0) |
static bool | isMachOPairedReloc (uint64_t RelocType, uint64_t Arch) |
static iterator_range< export_iterator > | exports (Error &Err, ArrayRef< uint8_t > Trie, const MachOObjectFile *O=nullptr) |
For use examining a trie not in a MachOObjectFile. More... | |
static iterator_range< rebase_iterator > | rebaseTable (Error &Err, MachOObjectFile *O, ArrayRef< uint8_t > Opcodes, bool is64) |
For use examining rebase opcodes in a MachOObjectFile. More... | |
static iterator_range< bind_iterator > | bindTable (Error &Err, MachOObjectFile *O, ArrayRef< uint8_t > Opcodes, bool is64, MachOBindEntry::Kind) |
For use examining bind opcodes in a MachOObjectFile. More... | |
static StringRef | guessLibraryShortName (StringRef Name, bool &isFramework, StringRef &Suffix) |
static Triple::ArchType | getArch (uint32_t CPUType, uint32_t CPUSubType) |
static Triple | getArchTriple (uint32_t CPUType, uint32_t CPUSubType, const char **McpuDefault=nullptr, const char **ArchFlag=nullptr) |
static bool | isValidArch (StringRef ArchFlag) |
static ArrayRef< StringRef > | getValidArchs () |
static Triple | getHostArch () |
static bool | classof (const Binary *v) |
static uint32_t | getVersionMinMajor (MachO::version_min_command &C, bool SDK) |
static uint32_t | getVersionMinMinor (MachO::version_min_command &C, bool SDK) |
static uint32_t | getVersionMinUpdate (MachO::version_min_command &C, bool SDK) |
static std::string | getBuildPlatform (uint32_t platform) |
static std::string | getBuildTool (uint32_t tools) |
static std::string | getVersionString (uint32_t version) |
static Expected< std::vector< std::string > > | findDsymObjectMembers (StringRef Path) |
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. More... | |
![]() | |
static Expected< OwningBinary< ObjectFile > > | createObjectFile (StringRef ObjectPath) |
static Expected< std::unique_ptr< ObjectFile > > | createObjectFile (MemoryBufferRef Object, llvm::file_magic Type, bool InitContent=true) |
static Expected< std::unique_ptr< ObjectFile > > | createObjectFile (MemoryBufferRef Object) |
static bool | classof (const Binary *v) |
static Expected< std::unique_ptr< COFFObjectFile > > | createCOFFObjectFile (MemoryBufferRef Object) |
static Expected< std::unique_ptr< ObjectFile > > | createXCOFFObjectFile (MemoryBufferRef Object, unsigned FileType) |
static Expected< std::unique_ptr< ObjectFile > > | createELFObjectFile (MemoryBufferRef Object, bool InitContent=true) |
static Expected< std::unique_ptr< MachOObjectFile > > | createMachOObjectFile (MemoryBufferRef Object, uint32_t UniversalCputype=0, uint32_t UniversalIndex=0) |
static Expected< std::unique_ptr< WasmObjectFile > > | createWasmObjectFile (MemoryBufferRef Object) |
![]() | |
static Expected< std::unique_ptr< SymbolicFile > > | createSymbolicFile (MemoryBufferRef Object, llvm::file_magic Type, LLVMContext *Context, bool InitContent=true) |
static Expected< std::unique_ptr< SymbolicFile > > | createSymbolicFile (MemoryBufferRef Object) |
static bool | classof (const Binary *v) |
static bool | isSymbolicFile (file_magic Type, const LLVMContext *Context) |
![]() | |
static Error | checkOffset (MemoryBufferRef M, uintptr_t Addr, const uint64_t Size) |
dice_iterator MachOObjectFile::begin_dices | ( | ) | const |
Definition at line 2850 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::dataoff, getDataInCodeLoadCommand(), getPtr(), and llvm::object::DataRefImpl::p.
MachOObjectFile::load_command_iterator MachOObjectFile::begin_load_commands | ( | ) | const |
Definition at line 4314 of file MachOObjectFile.cpp.
Referenced by load_commands().
|
inline |
Definition at line 547 of file MachO.h.
References llvm::jitlink::x86_64::PointerSize.
|
inline |
For use with a SegIndex,SegOffset pair from a checked Mach-O Bind or Rebase entry to get the address.
Definition at line 583 of file MachO.h.
Referenced by llvm::object::MachOAbstractFixupEntry::address(), and llvm::object::MachOAbstractFixupEntry::segmentAddress().
|
inline |
For use with a SegIndex,SegOffset pair from a checked Mach-O Bind or Rebase entry to get the section name.
Definition at line 577 of file MachO.h.
Referenced by llvm::object::MachOAbstractFixupEntry::sectionName().
|
inline |
For use with the SegIndex of a checked Mach-O Bind or Rebase entry to get the segment name.
Definition at line 571 of file MachO.h.
Referenced by llvm::object::MachOAbstractFixupEntry::segmentName().
iterator_range< bind_iterator > MachOObjectFile::bindTable | ( | Error & | Err | ) |
For use iterating over all bind table entries.
Definition at line 4288 of file MachOObjectFile.cpp.
|
static |
For use examining bind opcodes in a MachOObjectFile.
Error MachOObjectFile::checkSymbolTable | ( | ) | const |
Definition at line 1688 of file MachOObjectFile.cpp.
References llvm::MachO::DYNAMIC_LOOKUP_ORDINAL, llvm::MachO::EXECUTABLE_ORDINAL, llvm::MachO::mach_header_64::flags, llvm::MachO::GET_LIBRARY_ORDINAL(), getHeader(), getHeader64(), getSymbol64TableEntry(), getSymbolTableEntry(), getSymtabLoadCommand(), H, is64Bit(), malformedError(), llvm::MachO::MH_TWOLEVEL, llvm::MachO::nlist::n_desc, llvm::MachO::nlist_64::n_desc, llvm::MachO::N_INDR, llvm::MachO::N_PBUD, llvm::MachO::N_SECT, llvm::MachO::nlist::n_sect, llvm::MachO::nlist_64::n_sect, llvm::MachO::N_STAB, llvm::MachO::nlist::n_strx, llvm::MachO::nlist_64::n_strx, llvm::MachO::N_TYPE, llvm::MachO::nlist::n_type, llvm::MachO::nlist_64::n_type, llvm::MachO::N_UNDF, llvm::MachO::nlist::n_value, llvm::MachO::nlist_64::n_value, S, llvm::Error::success(), llvm::ARMBuildAttrs::Symbol, and llvm::object::ObjectFile::symbols().
Definition at line 720 of file MachO.h.
References llvm::object::Binary::isMachO().
|
static |
Definition at line 1248 of file MachOObjectFile.cpp.
Referenced by llvm::object::ObjectFile::createMachOObjectFile().
dice_iterator MachOObjectFile::end_dices | ( | ) | const |
Definition at line 2860 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::dataoff, llvm::MachO::linkedit_data_command::datasize, getDataInCodeLoadCommand(), getPtr(), and llvm::object::DataRefImpl::p.
MachOObjectFile::load_command_iterator MachOObjectFile::end_load_commands | ( | ) | const |
Definition at line 4319 of file MachOObjectFile.cpp.
Referenced by load_commands().
iterator_range< export_iterator > MachOObjectFile::exports | ( | Error & | Err | ) | const |
For use iterating over all exported symbols.
Definition at line 3191 of file MachOObjectFile.cpp.
|
static |
For use examining a trie not in a MachOObjectFile.
|
inline |
Definition at line 452 of file MachO.h.
References extrel_begin(), extrel_end(), and llvm::make_range().
relocation_iterator MachOObjectFile::extrel_begin | ( | ) | const |
Definition at line 2147 of file MachOObjectFile.cpp.
References llvm::object::ObjectFile::RelocationRef, and llvm::MipsISD::Ret.
Referenced by external_relocations().
relocation_iterator MachOObjectFile::extrel_end | ( | ) | const |
Definition at line 2155 of file MachOObjectFile.cpp.
References getDysymtabLoadCommand(), llvm::MachO::dysymtab_command::nextrel, llvm::object::ObjectFile::RelocationRef, and llvm::MipsISD::Ret.
Referenced by external_relocations().
|
static |
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.
Definition at line 4925 of file MachOObjectFile.cpp.
References llvm::sys::path::append(), llvm::createFileError(), llvm::createStringError(), llvm::errorCodeToError(), llvm::sys::path::extension(), llvm::sys::fs::is_directory(), llvm::no_such_file_or_directory, llvm::sys::fs::regular_file, llvm::sys::path::remove_dots(), llvm::sys::fs::status(), llvm::StringRef::str(), llvm::sys::fs::symlink_file, and llvm::sys::fs::type_unknown.
Referenced by llvm::InstrProfCorrelator::get().
iterator_range< fixup_iterator > MachOObjectFile::fixupTable | ( | Error & | Err | ) |
For iterating over all chained fixups.
Definition at line 4303 of file MachOObjectFile.cpp.
unsigned MachOObjectFile::getAnyRelocationAddress | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 4387 of file MachOObjectFile.cpp.
References getPlainRelocationAddress(), getScatteredRelocationAddress(), and isRelocationScattered().
Referenced by getRelocationOffset().
unsigned MachOObjectFile::getAnyRelocationLength | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 4401 of file MachOObjectFile.cpp.
References getPlainRelocationLength(), getScatteredRelocationLength(), and isRelocationScattered().
Referenced by llvm::RuntimeDyldMachO::getRelocationEntry(), getRelocationLength(), llvm::RuntimeDyldMachOAArch64::processRelocationRef(), and llvm::RuntimeDyldMachO::processScatteredVANILLA().
unsigned MachOObjectFile::getAnyRelocationPCRel | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 4394 of file MachOObjectFile.cpp.
References getPlainRelocationPCRel(), getScatteredRelocationPCRel(), and isRelocationScattered().
Referenced by llvm::RuntimeDyldMachO::getRelocationEntry(), llvm::RuntimeDyldMachOAArch64::processRelocationRef(), and llvm::RuntimeDyldMachO::processScatteredVANILLA().
SectionRef MachOObjectFile::getAnyRelocationSection | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 4417 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, getPlainRelocationExternal(), getPlainRelocationSymbolNum(), isRelocationScattered(), llvm::MachO::R_ABS, section_end(), and llvm::object::ObjectFile::SectionRef.
Referenced by getRelocationSection(), and llvm::RuntimeDyldMachO::getRelocationValueRef().
unsigned MachOObjectFile::getAnyRelocationType | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 4409 of file MachOObjectFile.cpp.
References getPlainRelocationType(), getScatteredRelocationType(), and isRelocationScattered().
Referenced by llvm::RuntimeDyldMachO::getRelocationEntry(), getRelocationType(), llvm::RuntimeDyldMachOI386::processRelocationRef(), llvm::RuntimeDyldMachOX86_64::processRelocationRef(), llvm::RuntimeDyldMachOARM::processRelocationRef(), llvm::RuntimeDyldMachOAArch64::processRelocationRef(), and llvm::RuntimeDyldMachO::processScatteredVANILLA().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Referenced by getRelocationTypeName().
|
static |
Definition at line 2638 of file MachOObjectFile.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_32, llvm::Triple::arm, llvm::MachO::CPU_TYPE_ARM, llvm::MachO::CPU_TYPE_ARM64, llvm::MachO::CPU_TYPE_ARM64_32, llvm::MachO::CPU_TYPE_I386, llvm::MachO::CPU_TYPE_POWERPC, llvm::MachO::CPU_TYPE_POWERPC64, llvm::MachO::CPU_TYPE_X86_64, llvm::Triple::ppc, llvm::Triple::ppc64, llvm::Triple::UnknownArch, llvm::Triple::x86, and llvm::Triple::x86_64.
|
static |
|
inlinestatic |
Definition at line 742 of file MachO.h.
References llvm::format_hex(), llvm::MachO::PLATFORM_BRIDGEOS, llvm::MachO::PLATFORM_DRIVERKIT, llvm::MachO::PLATFORM_IOS, llvm::MachO::PLATFORM_IOSSIMULATOR, llvm::MachO::PLATFORM_MACCATALYST, llvm::MachO::PLATFORM_MACOS, llvm::MachO::PLATFORM_TVOS, llvm::MachO::PLATFORM_TVOSSIMULATOR, llvm::MachO::PLATFORM_WATCHOS, llvm::MachO::PLATFORM_WATCHOSSIMULATOR, ret(), and llvm::raw_string_ostream::str().
|
inlinestatic |
Definition at line 762 of file MachO.h.
References llvm::format_hex(), ret(), llvm::raw_string_ostream::str(), llvm::MachO::TOOL_CLANG, llvm::MachO::TOOL_LD, llvm::MachO::TOOL_SWIFT, and tools.
MachO::build_tool_version MachOObjectFile::getBuildToolVersion | ( | unsigned | index | ) | const |
Definition at line 4499 of file MachOObjectFile.cpp.
References index.
MachO::build_version_command MachOObjectFile::getBuildVersionLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4494 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
overridevirtual |
The number of bytes used to represent an address in this object file format.
Implements llvm::object::ObjectFile.
Definition at line 2605 of file MachOObjectFile.cpp.
References is64Bit().
Expected< Optional< MachO::dyld_chained_fixups_header > > MachOObjectFile::getChainedFixupsHeader | ( | ) | const |
If the optional is None, no header was found, but the object was well-formed.
Definition at line 4769 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::dataoff, llvm::MachO::linkedit_data_command::datasize, llvm::MachO::dyld_chained_fixups_header::fixups_version, getPtr(), llvm::MachO::dyld_chained_fixups_header::imports_format, malformedError(), llvm::None, and llvm::MachO::dyld_chained_fixups_header::starts_offset.
Referenced by getDyldChainedFixupTargets().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1825 of file MachOObjectFile.cpp.
References getNValue().
MachO::linkedit_data_command MachOObjectFile::getDataInCodeLoadCommand | ( | ) | const |
Definition at line 4684 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::cmd, llvm::MachO::linkedit_data_command::cmdsize, llvm::MachO::linkedit_data_command::dataoff, and llvm::MachO::linkedit_data_command::datasize.
Referenced by begin_dices(), and end_dices().
MachO::data_in_code_entry MachOObjectFile::getDataInCodeTableEntry | ( | uint32_t | DataOffset, |
unsigned | Index | ||
) | const |
Definition at line 4633 of file MachOObjectFile.cpp.
References getPtr().
MachO::data_in_code_entry MachOObjectFile::getDice | ( | DataRefImpl | Rel | ) | const |
Definition at line 4611 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by llvm::object::DiceRef::getKind(), llvm::object::DiceRef::getLength(), and llvm::object::DiceRef::getOffset().
Expected< std::vector< ChainedFixupTarget > > MachOObjectFile::getDyldChainedFixupTargets | ( | ) | const |
Definition at line 4824 of file MachOObjectFile.cpp.
References getChainedFixupsHeader().
Referenced by llvm::object::MachOChainedFixupEntry::MachOChainedFixupEntry().
ArrayRef< uint8_t > MachOObjectFile::getDyldInfoBindOpcodes | ( | ) | const |
Definition at line 4726 of file MachOObjectFile.cpp.
References llvm::MachO::dyld_info_command::bind_off, llvm::MachO::dyld_info_command::bind_size, getPtr(), llvm::makeArrayRef(), and llvm::None.
ArrayRef< uint8_t > MachOObjectFile::getDyldInfoExportsTrie | ( | ) | const |
Definition at line 4834 of file MachOObjectFile.cpp.
References llvm::MachO::dyld_info_command::export_off, llvm::MachO::dyld_info_command::export_size, getPtr(), llvm::makeArrayRef(), and llvm::None.
ArrayRef< uint8_t > MachOObjectFile::getDyldInfoLazyBindOpcodes | ( | ) | const |
Definition at line 4754 of file MachOObjectFile.cpp.
References getPtr(), llvm::MachO::dyld_info_command::lazy_bind_off, llvm::MachO::dyld_info_command::lazy_bind_size, llvm::makeArrayRef(), and llvm::None.
MachO::dyld_info_command MachOObjectFile::getDyldInfoLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4509 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
ArrayRef< uint8_t > MachOObjectFile::getDyldInfoRebaseOpcodes | ( | ) | const |
Definition at line 4712 of file MachOObjectFile.cpp.
References getPtr(), llvm::makeArrayRef(), llvm::None, llvm::MachO::dyld_info_command::rebase_off, and llvm::MachO::dyld_info_command::rebase_size.
ArrayRef< uint8_t > MachOObjectFile::getDyldInfoWeakBindOpcodes | ( | ) | const |
Definition at line 4740 of file MachOObjectFile.cpp.
References getPtr(), llvm::makeArrayRef(), llvm::None, llvm::MachO::dyld_info_command::weak_bind_off, and llvm::MachO::dyld_info_command::weak_bind_size.
MachO::dylib_command MachOObjectFile::getDylibIDLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4504 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::dylinker_command MachOObjectFile::getDylinkerCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4514 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::dysymtab_command MachOObjectFile::getDysymtabLoadCommand | ( | ) | const |
Definition at line 4654 of file MachOObjectFile.cpp.
References llvm::MachO::dysymtab_command::cmd, llvm::MachO::dysymtab_command::cmdsize, llvm::MachO::dysymtab_command::extrefsymoff, llvm::MachO::dysymtab_command::extreloff, llvm::MachO::dysymtab_command::iextdefsym, llvm::MachO::dysymtab_command::ilocalsym, llvm::MachO::dysymtab_command::indirectsymoff, llvm::MachO::dysymtab_command::iundefsym, llvm::MachO::dysymtab_command::locreloff, llvm::MachO::dysymtab_command::modtaboff, llvm::MachO::dysymtab_command::nextdefsym, llvm::MachO::dysymtab_command::nextrefsyms, llvm::MachO::dysymtab_command::nextrel, llvm::MachO::dysymtab_command::nindirectsyms, llvm::MachO::dysymtab_command::nlocalsym, llvm::MachO::dysymtab_command::nlocrel, llvm::MachO::dysymtab_command::nmodtab, llvm::MachO::dysymtab_command::ntoc, llvm::MachO::dysymtab_command::nundefsym, and llvm::MachO::dysymtab_command::tocoff.
Referenced by extrel_end(), getRelocation(), locrel_end(), and llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection().
MachO::encryption_info_command MachOObjectFile::getEncryptionInfoCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4539 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::encryption_info_command_64 MachOObjectFile::getEncryptionInfoCommand64 | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4544 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::entry_point_command MachOObjectFile::getEntryPointCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4534 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
inlineoverridevirtual |
Implements llvm::object::ObjectFile.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2609 of file MachOObjectFile.cpp.
References llvm::MachO::CPU_TYPE_ARM, llvm::MachO::CPU_TYPE_ARM64, llvm::MachO::CPU_TYPE_ARM64_32, llvm::MachO::CPU_TYPE_I386, llvm::MachO::CPU_TYPE_POWERPC, llvm::MachO::CPU_TYPE_POWERPC64, llvm::MachO::CPU_TYPE_X86_64, getCPUType(), and is64Bit().
SmallVector< uint64_t > MachOObjectFile::getFunctionStarts | ( | ) | const |
Definition at line 4848 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::dataoff, Info, move, and ReadULEB128s().
const MachO::mach_header & MachOObjectFile::getHeader | ( | ) | const |
Definition at line 4616 of file MachOObjectFile.cpp.
References Header.
Referenced by checkSymbolTable(), getRelocation(), getRelocationOffset(), and isRelocatableObject().
const MachO::mach_header_64 & MachOObjectFile::getHeader64 | ( | ) | const |
Definition at line 4620 of file MachOObjectFile.cpp.
References assert(), Header64, and is64Bit().
Referenced by checkSymbolTable().
|
static |
Definition at line 2796 of file MachOObjectFile.cpp.
References llvm::sys::getDefaultTargetTriple().
std::error_code MachOObjectFile::getIndirectName | ( | DataRefImpl | Symb, |
StringRef & | Res | ||
) | const |
Definition at line 1794 of file MachOObjectFile.cpp.
References getStringTableData().
uint32_t MachOObjectFile::getIndirectSymbolTableEntry | ( | const MachO::dysymtab_command & | DLC, |
unsigned | Index | ||
) | const |
Definition at line 4625 of file MachOObjectFile.cpp.
References llvm::AMDGPU::CPol::DLC, and getPtr().
Referenced by llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection().
uint32_t MachOObjectFile::getLibraryCount | ( | ) | const |
Definition at line 2535 of file MachOObjectFile.cpp.
std::error_code MachOObjectFile::getLibraryShortNameByIndex | ( | unsigned | Index, |
StringRef & | Res | ||
) | const |
Definition at line 2501 of file MachOObjectFile.cpp.
References D, llvm::StringRef::empty(), guessLibraryShortName(), i, P, and llvm::object::parse_failed.
MachO::linkedit_data_command MachOObjectFile::getLinkeditDataLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4464 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::linker_option_command MachOObjectFile::getLinkerOptionLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4479 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::linkedit_data_command MachOObjectFile::getLinkOptHintsLoadCommand | ( | ) | const |
Definition at line 4698 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::cmd, llvm::MachO::linkedit_data_command::cmdsize, llvm::MachO::linkedit_data_command::dataoff, and llvm::MachO::linkedit_data_command::datasize.
MachO::note_command MachOObjectFile::getNoteLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4489 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
uint64_t MachOObjectFile::getNValue | ( | DataRefImpl | Sym | ) | const |
Definition at line 1783 of file MachOObjectFile.cpp.
References is64Bit().
Referenced by getCommonSymbolSizeImpl().
bool MachOObjectFile::getPlainRelocationExternal | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 4365 of file MachOObjectFile.cpp.
References llvm::object::Binary::isLittleEndian(), and llvm::MachO::any_relocation_info::r_word1.
Referenced by getAnyRelocationSection(), getRelocationSymbol(), llvm::RuntimeDyldMachO::getRelocationValueRef(), llvm::RuntimeDyldMachOX86_64::processRelocationRef(), llvm::RuntimeDyldMachOARM::processRelocationRef(), and llvm::RuntimeDyldMachOAArch64::processRelocationRef().
unsigned MachOObjectFile::getPlainRelocationSymbolNum | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 4358 of file MachOObjectFile.cpp.
References llvm::object::Binary::isLittleEndian(), and llvm::MachO::any_relocation_info::r_word1.
Referenced by getAnyRelocationSection(), getRelocationSymbol(), and llvm::RuntimeDyldMachOAArch64::processRelocationRef().
MachO::any_relocation_info MachOObjectFile::getRelocation | ( | DataRefImpl | Rel | ) | const |
Definition at line 4584 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::b, llvm::object::DataRefImpl::d, llvm::MachO::dysymtab_command::extreloff, getDysymtabLoadCommand(), getHeader(), getPtr(), getSection(), getSection64(), is64Bit(), llvm::MachO::dysymtab_command::locreloff, llvm::MachO::MH_OBJECT, P, llvm::MachO::section::reloff, and llvm::MachO::section_64::reloff.
Referenced by llvm::RuntimeDyldMachO::getRelocationEntry(), llvm::jitlink::MachOLinkGraphBuilder::getRelocationInfo(), getRelocationLength(), getRelocationOffset(), getRelocationSection(), getRelocationSymbol(), getRelocationType(), llvm::RuntimeDyldMachO::getRelocationValueRef(), llvm::RuntimeDyldMachOX86_64::processRelocationRef(), llvm::RuntimeDyldMachOI386::processRelocationRef(), llvm::RuntimeDyldMachOARM::processRelocationRef(), llvm::RuntimeDyldMachOAArch64::processRelocationRef(), and llvm::RuntimeDyldMachO::processScatteredVANILLA().
uint8_t MachOObjectFile::getRelocationLength | ( | DataRefImpl | Rel | ) | const |
Definition at line 2334 of file MachOObjectFile.cpp.
References getAnyRelocationLength(), and getRelocation().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2185 of file MachOObjectFile.cpp.
References assert(), getAnyRelocationAddress(), getHeader(), getRelocation(), llvm::MachO::MH_KEXT_BUNDLE, and llvm::MachO::MH_OBJECT.
section_iterator MachOObjectFile::getRelocationRelocatedSection | ( | relocation_iterator | Rel | ) | const |
Definition at line 2540 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and llvm::object::ObjectFile::SectionRef.
section_iterator MachOObjectFile::getRelocationSection | ( | DataRefImpl | Rel | ) | const |
Definition at line 2215 of file MachOObjectFile.cpp.
References getAnyRelocationSection(), and getRelocation().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2194 of file MachOObjectFile.cpp.
References getPlainRelocationExternal(), getPlainRelocationSymbolNum(), getPtr(), getRelocation(), getSymtabLoadCommand(), is64Bit(), isRelocationScattered(), llvm::object::DataRefImpl::p, S, symbol_end(), llvm::object::ObjectFile::SymbolRef, and llvm::XCOFF::SymbolTableEntrySize.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2219 of file MachOObjectFile.cpp.
References getAnyRelocationType(), and getRelocation().
Referenced by getRelocationTypeName().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2224 of file MachOObjectFile.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_32, llvm::Triple::arm, llvm::array_lengthof(), llvm::StringRef::begin(), llvm::StringRef::end(), getArch(), getRelocationType(), llvm::Triple::ppc, llvm::Triple::UnknownArch, llvm::Triple::x86, and llvm::Triple::x86_64.
MachO::routines_command MachOObjectFile::getRoutinesCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4569 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::routines_command_64 MachOObjectFile::getRoutinesCommand64 | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4574 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::rpath_command MachOObjectFile::getRpathCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4524 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
bool MachOObjectFile::getScatteredRelocationScattered | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 4372 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word0.
uint32_t MachOObjectFile::getScatteredRelocationType | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 4382 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word0.
Referenced by getAnyRelocationType().
uint32_t MachOObjectFile::getScatteredRelocationValue | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 4377 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word1.
Referenced by llvm::RuntimeDyldMachO::processScatteredVANILLA().
MachO::section MachOObjectFile::getSection | ( | const LoadCommandInfo & | L, |
unsigned | Index | ||
) | const |
Definition at line 4439 of file MachOObjectFile.cpp.
References getSectionPtr().
MachO::section MachOObjectFile::getSection | ( | DataRefImpl | DRI | ) | const |
Definition at line 4429 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, assert(), and llvm::object::DataRefImpl::d.
Expected< SectionRef > MachOObjectFile::getSection | ( | StringRef | SectionName | ) | const |
Definition at line 2009 of file MachOObjectFile.cpp.
References llvm::errorCodeToError(), llvm::object::parse_failed, llvm::ARMBuildAttrs::Section, and llvm::object::ObjectFile::sections().
Expected< SectionRef > MachOObjectFile::getSection | ( | unsigned | SectionIndex | ) | const |
Definition at line 2000 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, malformedError(), and llvm::object::ObjectFile::SectionRef.
Referenced by getRelocation(), getSectionAddress(), getSectionAlignment(), getSectionSize(), isSectionStripped(), and llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection().
MachO::section_64 MachOObjectFile::getSection64 | ( | const LoadCommandInfo & | L, |
unsigned | Index | ||
) | const |
Definition at line 4445 of file MachOObjectFile.cpp.
References getSectionPtr().
MachO::section_64 MachOObjectFile::getSection64 | ( | DataRefImpl | DRI | ) | const |
Definition at line 4434 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, assert(), and llvm::object::DataRefImpl::d.
Referenced by getRelocation(), getSectionAddress(), getSectionAlignment(), getSectionSize(), and isSectionStripped().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1925 of file MachOObjectFile.cpp.
References llvm::MachO::section_64::addr, getSection(), getSection64(), and is64Bit().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1987 of file MachOObjectFile.cpp.
References Align, llvm::MachO::section::align, llvm::MachO::section_64::align, getSection(), getSection64(), and is64Bit().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1964 of file MachOObjectFile.cpp.
References llvm::object::Binary::getData(), Offset, llvm::Check::Size, and substr().
StringRef MachOObjectFile::getSectionFinalSegmentName | ( | DataRefImpl | Sec | ) | const |
Definition at line 4329 of file MachOObjectFile.cpp.
References llvm::ArrayRef< T >::data(), getSectionRawFinalSegmentName(), and parseSegmentOrSectionName().
Referenced by llvm::object::BindRebaseSegInfo::BindRebaseSegInfo(), llvm::orc::getMachOObjectFileSymbolInfo(), and isSectionBitcode().
unsigned MachOObjectFile::getSectionID | ( | SectionRef | Sec | ) | const |
Definition at line 2099 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and llvm::object::SectionRef::getRawDataRefImpl().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1931 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1920 of file MachOObjectFile.cpp.
References llvm::ArrayRef< T >::data(), getSectionRawName(), and parseSegmentOrSectionName().
Referenced by llvm::orc::getMachOObjectFileSymbolInfo(), isDebugSection(), and isSectionBitcode().
ArrayRef< char > MachOObjectFile::getSectionRawFinalSegmentName | ( | DataRefImpl | Sec | ) | const |
Definition at line 4343 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, assert(), llvm::sampleprof::Base, llvm::object::DataRefImpl::d, and llvm::makeArrayRef().
Referenced by getSectionFinalSegmentName().
ArrayRef< char > MachOObjectFile::getSectionRawName | ( | DataRefImpl | Sec | ) | const |
Definition at line 4335 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, assert(), llvm::sampleprof::Base, llvm::object::DataRefImpl::d, and llvm::makeArrayRef().
Referenced by getSectionName().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1935 of file MachOObjectFile.cpp.
References llvm::MachO::section::flags, llvm::MachO::section_64::flags, llvm::object::Binary::getData(), getSection(), getSection64(), is64Bit(), llvm::MachO::section::offset, llvm::MachO::section_64::offset, llvm::MachO::S_GB_ZEROFILL, llvm::MachO::S_ZEROFILL, llvm::MachO::SECTION_TYPE, llvm::StringRef::size(), llvm::MachO::section::size, and llvm::MachO::section_64::size.
unsigned MachOObjectFile::getSectionType | ( | SectionRef | Sec | ) | const |
Definition at line 1777 of file MachOObjectFile.cpp.
References llvm::object::SectionRef::getRawDataRefImpl(), getSectionFlags(), and llvm::MachO::SECTION_TYPE.
Referenced by llvm::orc::getMachOObjectFileSymbolInfo().
MachO::segment_command_64 MachOObjectFile::getSegment64LoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4474 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
Referenced by llvm::object::MachOAbstractFixupEntry::MachOAbstractFixupEntry().
Return the raw contents of an entire segment.
Definition at line 2078 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::C, llvm::MachO::load_command::cmd, llvm::ArrayRef< T >::empty(), and load_commands().
MachO::segment_command MachOObjectFile::getSegmentLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4469 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
Referenced by llvm::object::MachOAbstractFixupEntry::MachOAbstractFixupEntry().
MachO::source_version_command MachOObjectFile::getSourceVersionCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4529 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
StringRef MachOObjectFile::getStringTableData | ( | ) | const |
Definition at line 4871 of file MachOObjectFile.cpp.
References llvm::object::Binary::getData(), getSymtabLoadCommand(), S, and llvm::StringRef::substr().
Referenced by getIndirectName(), and getSymbolName().
MachO::sub_client_command MachOObjectFile::getSubClientCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4564 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::sub_framework_command MachOObjectFile::getSubFrameworkCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4549 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::sub_library_command MachOObjectFile::getSubLibraryCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4559 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::sub_umbrella_command MachOObjectFile::getSubUmbrellaCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4554 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::nlist_64 MachOObjectFile::getSymbol64TableEntry | ( | DataRefImpl | DRI | ) | const |
Definition at line 4458 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by checkSymbolTable().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1812 of file MachOObjectFile.cpp.
References llvm::object::ObjectFile::getSymbolValue().
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 1816 of file MachOObjectFile.cpp.
References llvm::cantFail(), getSymbolFlags(), and llvm::object::BasicSymbolRef::SF_Common.
symbol_iterator MachOObjectFile::getSymbolByIndex | ( | unsigned | Index | ) | const |
Definition at line 2570 of file MachOObjectFile.cpp.
References getPtr(), getSymtabLoadCommand(), is64Bit(), llvm::MachO::symtab_command::nsyms, llvm::object::DataRefImpl::p, llvm::report_fatal_error(), llvm::object::ObjectFile::SymbolRef, llvm::XCOFF::SymbolTableEntrySize, and llvm::MachO::symtab_command::symoff.
Referenced by llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection(), and symbol_begin().
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1855 of file MachOObjectFile.cpp.
Referenced by getSymbolAlignment().
uint64_t MachOObjectFile::getSymbolIndex | ( | DataRefImpl | Symb | ) | const |
Definition at line 2582 of file MachOObjectFile.cpp.
References getPtr(), getSymtabLoadCommand(), is64Bit(), llvm::object::DataRefImpl::p, llvm::report_fatal_error(), llvm::XCOFF::SymbolTableEntrySize, and llvm::MachO::symtab_command::symoff.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1762 of file MachOObjectFile.cpp.
References getStringTableData().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1895 of file MachOObjectFile.cpp.
unsigned MachOObjectFile::getSymbolSectionID | ( | SymbolRef | Symb | ) | const |
Definition at line 1910 of file MachOObjectFile.cpp.
MachO::nlist MachOObjectFile::getSymbolTableEntry | ( | DataRefImpl | DRI | ) | const |
Definition at line 4452 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by checkSymbolTable().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1830 of file MachOObjectFile.cpp.
MachO::symtab_command MachOObjectFile::getSymtabLoadCommand | ( | ) | const |
Definition at line 4639 of file MachOObjectFile.cpp.
References llvm::MachO::symtab_command::cmd, llvm::MachO::symtab_command::cmdsize, llvm::MachO::symtab_command::nsyms, llvm::MachO::symtab_command::stroff, llvm::MachO::symtab_command::strsize, and llvm::MachO::symtab_command::symoff.
Referenced by checkSymbolTable(), getRelocationSymbol(), getStringTableData(), getSymbolByIndex(), getSymbolIndex(), symbol_begin(), and symbol_end().
MachO::thread_command MachOObjectFile::getThreadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4579 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
ArrayRef< uint8_t > MachOObjectFile::getUuid | ( | ) | const |
Definition at line 4863 of file MachOObjectFile.cpp.
References llvm::makeArrayRef(), llvm::None, and offsetof.
MachO::uuid_command MachOObjectFile::getUuidCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4519 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
Definition at line 2805 of file MachOObjectFile.cpp.
Referenced by isValidArch().
MachO::version_min_command MachOObjectFile::getVersionMinLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4484 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 775 of file MachO.h.
References llvm::IndexedInstrProf::Version.
|
static |
Definition at line 2375 of file MachOObjectFile.cpp.
References b, c, d, F, llvm::Lib, llvm::StringRef::npos, llvm::StringRef::rfind(), llvm::StringRef::size(), llvm::StringRef::slice(), and llvm::StringRef::startswith().
Referenced by getLibraryShortNameByIndex().
|
inline |
Definition at line 718 of file MachO.h.
Referenced by llvm::object::BindRebaseSegInfo::BindRebaseSegInfo().
bool MachOObjectFile::is64Bit | ( | ) | const |
Definition at line 4876 of file MachOObjectFile.cpp.
References llvm::object::Binary::getMachOType(), and llvm::object::Binary::getType().
Referenced by checkSymbolTable(), getBytesInAddress(), getFileFormatName(), getHeader64(), getNValue(), getRelocation(), getRelocationSymbol(), getSectionAddress(), getSectionAlignment(), getSectionSize(), getSymbolByIndex(), getSymbolIndex(), isSectionStripped(), moveSymbolNext(), llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection(), and symbol_end().
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 2045 of file MachOObjectFile.cpp.
References llvm::consumeError(), llvm::Expected< T >::get(), getSectionName(), and llvm::Expected< T >::takeError().
Definition at line 4979 of file MachOObjectFile.cpp.
References llvm::Triple::aarch64, llvm::Triple::arm, llvm::MachO::ARM64_RELOC_SUBTRACTOR, llvm::MachO::ARM_RELOC_HALF, llvm::MachO::ARM_RELOC_HALF_SECTDIFF, llvm::MachO::ARM_RELOC_LOCAL_SECTDIFF, llvm::MachO::ARM_RELOC_SECTDIFF, llvm::MachO::GENERIC_RELOC_LOCAL_SECTDIFF, llvm::MachO::GENERIC_RELOC_SECTDIFF, llvm::Triple::thumb, llvm::Triple::x86, llvm::Triple::x86_64, and llvm::MachO::X86_64_RELOC_SUBTRACTOR.
|
overridevirtual |
True if this is a relocatable object (.o/.obj).
Implements llvm::object::ObjectFile.
Definition at line 4893 of file MachOObjectFile.cpp.
References llvm::MachO::mach_header::filetype, getHeader(), and llvm::MachO::MH_OBJECT.
Referenced by llvm::jitlink::MachOLinkGraphBuilder::buildGraph().
bool MachOObjectFile::isRelocationScattered | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 4351 of file MachOObjectFile.cpp.
References llvm::MachO::CPU_TYPE_X86_64, getCPUType(), getPlainRelocationAddress(), and llvm::MachO::R_SCATTERED.
Referenced by getAnyRelocationAddress(), getAnyRelocationLength(), getAnyRelocationPCRel(), getAnyRelocationSection(), getAnyRelocationType(), getRelocationSymbol(), llvm::RuntimeDyldMachOX86_64::processRelocationRef(), llvm::RuntimeDyldMachOI386::processRelocationRef(), llvm::RuntimeDyldMachOARM::processRelocationRef(), and llvm::RuntimeDyldMachOAArch64::processRelocationRef().
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 2110 of file MachOObjectFile.cpp.
References getSectionFinalSegmentName(), and getSectionName().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2037 of file MachOObjectFile.cpp.
References getSectionFlags(), llvm::MachO::S_ATTR_PURE_INSTRUCTIONS, llvm::MachO::S_GB_ZEROFILL, llvm::MachO::S_ZEROFILL, and llvm::MachO::SECTION_TYPE.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2020 of file MachOObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2029 of file MachOObjectFile.cpp.
References getSectionFlags(), llvm::MachO::S_ATTR_PURE_INSTRUCTIONS, llvm::MachO::S_GB_ZEROFILL, llvm::MachO::S_ZEROFILL, and llvm::MachO::SECTION_TYPE.
|
overridevirtual |
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).
Reimplemented from llvm::object::ObjectFile.
Definition at line 2117 of file MachOObjectFile.cpp.
References getSection(), getSection64(), is64Bit(), and llvm::MachO::section_64::offset.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2024 of file MachOObjectFile.cpp.
References getSectionFlags(), and llvm::MachO::S_ATTR_PURE_INSTRUCTIONS.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2103 of file MachOObjectFile.cpp.
References getSectionFlags(), llvm::MachO::S_GB_ZEROFILL, llvm::MachO::S_ZEROFILL, and llvm::MachO::SECTION_TYPE.
|
static |
Definition at line 2800 of file MachOObjectFile.cpp.
References getValidArchs(), and llvm::is_contained().
iterator_range< bind_iterator > MachOObjectFile::lazyBindTable | ( | Error & | Err | ) |
For use iterating over all lazy bind table entries.
Definition at line 4293 of file MachOObjectFile.cpp.
iterator_range< MachOObjectFile::load_command_iterator > MachOObjectFile::load_commands | ( | ) | const |
Definition at line 4324 of file MachOObjectFile.cpp.
References begin_load_commands(), end_load_commands(), and llvm::make_range().
Referenced by getSegmentContents(), and llvm::object::MachOAbstractFixupEntry::MachOAbstractFixupEntry().
relocation_iterator MachOObjectFile::locrel_begin | ( | ) | const |
Definition at line 2164 of file MachOObjectFile.cpp.
References llvm::object::ObjectFile::RelocationRef, and llvm::MipsISD::Ret.
relocation_iterator MachOObjectFile::locrel_end | ( | ) | const |
Definition at line 2172 of file MachOObjectFile.cpp.
References getDysymtabLoadCommand(), llvm::MachO::dysymtab_command::nlocrel, llvm::object::ObjectFile::RelocationRef, and llvm::MipsISD::Ret.
Maps a debug section name to a standard DWARF section name.
Reimplemented from llvm::object::ObjectFile.
Definition at line 4918 of file MachOObjectFile.cpp.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Default().
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 4968 of file MachOObjectFile.cpp.
References llvm::StringSwitch< T, R >::Default(), and llvm::binaryformat::unknown.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2181 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::b, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1916 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1755 of file MachOObjectFile.cpp.
References is64Bit(), llvm::object::DataRefImpl::p, and llvm::XCOFF::SymbolTableEntrySize.
void MachOObjectFile::ReadULEB128s | ( | uint64_t | Index, |
SmallVectorImpl< uint64_t > & | Out | ||
) | const |
Definition at line 4881 of file MachOObjectFile.cpp.
References llvm::object::Binary::getData(), and llvm::DataExtractor::getULEB128().
Referenced by getFunctionStarts().
|
inline |
Definition at line 560 of file MachO.h.
References llvm::jitlink::x86_64::PointerSize.
iterator_range< rebase_iterator > MachOObjectFile::rebaseTable | ( | Error & | Err | ) |
For use iterating over all rebase table entries.
Definition at line 3628 of file MachOObjectFile.cpp.
|
static |
For use examining rebase opcodes in a MachOObjectFile.
Definition at line 3615 of file MachOObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2594 of file MachOObjectFile.cpp.
References llvm::object::ObjectFile::SectionRef.
Referenced by llvm::RuntimeDyldMachO::getSectionByAddress().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2599 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and llvm::object::ObjectFile::SectionRef.
Referenced by getAnyRelocationSection(), llvm::RuntimeDyldMachO::getSectionByAddress(), and llvm::RuntimeDyldMachO::processScatteredVANILLA().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Referenced by section_rel_begin().
relocation_iterator MachOObjectFile::section_rel_begin | ( | unsigned | Index | ) | const |
Definition at line 2838 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and section_rel_begin().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Referenced by section_rel_end().
relocation_iterator MachOObjectFile::section_rel_end | ( | unsigned | Index | ) | const |
Definition at line 2844 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and section_rel_end().
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 2546 of file MachOObjectFile.cpp.
References getSymbolByIndex(), getSymtabLoadCommand(), llvm::MachO::symtab_command::nsyms, and llvm::object::ObjectFile::SymbolRef.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 2555 of file MachOObjectFile.cpp.
References getPtr(), getSymtabLoadCommand(), is64Bit(), llvm::MachO::symtab_command::nsyms, llvm::object::DataRefImpl::p, llvm::object::ObjectFile::SymbolRef, llvm::XCOFF::SymbolTableEntrySize, and llvm::MachO::symtab_command::symoff.
Referenced by getRelocationSymbol().
iterator_range< bind_iterator > MachOObjectFile::weakBindTable | ( | Error & | Err | ) |
For use iterating over all weak bind table entries.
Definition at line 4298 of file MachOObjectFile.cpp.
MachO::mach_header llvm::object::MachOObjectFile::Header |
Definition at line 803 of file MachO.h.
Referenced by getHeader().
MachO::mach_header_64 llvm::object::MachOObjectFile::Header64 |
Definition at line 802 of file MachO.h.
Referenced by getHeader64().