|
LLVM
3.7.0
|
#include <MachO.h>
Classes | |
| struct | LoadCommandInfo |
Public Types | |
| typedef SmallVector < LoadCommandInfo, 4 > | LoadCommandList |
| typedef LoadCommandList::const_iterator | load_command_iterator |
Public Types inherited from llvm::object::ObjectFile | |
| typedef iterator_range < symbol_iterator > | symbol_iterator_range |
| typedef iterator_range < section_iterator > | section_iterator_range |
Public Types inherited from llvm::object::SymbolicFile | |
| typedef iterator_range < basic_symbol_iterator > | basic_symbol_iterator_range |
Static Public Member Functions | |
| static iterator_range < export_iterator > | exports (ArrayRef< uint8_t > Trie) |
| For use examining a trie not in a MachOObjectFile. More... | |
| static iterator_range < rebase_iterator > | rebaseTable (ArrayRef< uint8_t > Opcodes, bool is64) |
| For use examining rebase opcodes not in a MachOObjectFile. More... | |
| static iterator_range < bind_iterator > | bindTable (ArrayRef< uint8_t > Opcodes, bool is64, MachOBindEntry::Kind) |
| For use examining bind opcodes not in a MachOObjectFile. More... | |
| static StringRef | guessLibraryShortName (StringRef Name, bool &isFramework, StringRef &Suffix) |
| static Triple::ArchType | getArch (uint32_t CPUType) |
| static Triple | getArch (uint32_t CPUType, uint32_t CPUSubType, const char **McpuDefault=nullptr) |
| static Triple | getThumbArch (uint32_t CPUType, uint32_t CPUSubType, const char **McpuDefault=nullptr) |
| static Triple | getArch (uint32_t CPUType, uint32_t CPUSubType, const char **McpuDefault, Triple *ThumbTriple) |
| static bool | isValidArch (StringRef ArchFlag) |
| static Triple | getHostArch () |
| static bool | classof (const Binary *v) |
Static Public Member Functions inherited from llvm::object::ObjectFile | |
| static ErrorOr< OwningBinary < ObjectFile > > | createObjectFile (StringRef ObjectPath) |
| Create ObjectFile from path. More... | |
| static ErrorOr < std::unique_ptr< ObjectFile > > | createObjectFile (MemoryBufferRef Object, sys::fs::file_magic Type) |
| static ErrorOr < std::unique_ptr< ObjectFile > > | createObjectFile (MemoryBufferRef Object) |
| static bool | classof (const Binary *v) |
| static ErrorOr < std::unique_ptr < COFFObjectFile > > | createCOFFObjectFile (MemoryBufferRef Object) |
| static ErrorOr < std::unique_ptr< ObjectFile > > | createELFObjectFile (MemoryBufferRef Object) |
| static ErrorOr < std::unique_ptr < MachOObjectFile > > | createMachOObjectFile (MemoryBufferRef Object) |
Static Public Member Functions inherited from llvm::object::SymbolicFile | |
| static ErrorOr < std::unique_ptr < SymbolicFile > > | createSymbolicFile (MemoryBufferRef Object, sys::fs::file_magic Type, LLVMContext *Context) |
| static ErrorOr < std::unique_ptr < SymbolicFile > > | createSymbolicFile (MemoryBufferRef Object) |
| static ErrorOr< OwningBinary < SymbolicFile > > | createSymbolicFile (StringRef ObjectPath) |
| static bool | classof (const Binary *v) |
Definition at line 187 of file Object/MachO.h.
Definition at line 194 of file Object/MachO.h.
Definition at line 193 of file Object/MachO.h.
| MachOObjectFile::MachOObjectFile | ( | MemoryBufferRef | Object, |
| bool | IsLittleEndian, | ||
| bool | Is64Bits, | ||
| std::error_code & | EC | ||
| ) |
Definition at line 227 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::C, llvm::MachO::load_command::cmd, getFirstLoadCommandInfo(), getHeader(), getNextLoadCommandInfo(), Header, Header64, I, is64Bit(), llvm::MachO::LC_DATA_IN_CODE, llvm::MachO::LC_DYLD_INFO, llvm::MachO::LC_DYLD_INFO_ONLY, llvm::MachO::LC_DYSYMTAB, llvm::MachO::LC_LAZY_LOAD_DYLIB, llvm::MachO::LC_LINKER_OPTIMIZATION_HINT, llvm::MachO::LC_LOAD_DYLIB, llvm::MachO::LC_LOAD_UPWARD_DYLIB, llvm::MachO::LC_LOAD_WEAK_DYLIB, llvm::MachO::LC_REEXPORT_DYLIB, llvm::MachO::LC_SEGMENT, llvm::MachO::LC_SEGMENT_64, llvm::MachO::LC_SYMTAB, llvm::MachO::LC_UUID, llvm::SPII::Load, llvm::MachO::mach_header::ncmds, llvm::object::parse_failed, parseHeader(), llvm::object::MachOObjectFile::LoadCommandInfo::Ptr, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
| dice_iterator MachOObjectFile::begin_dices | ( | ) | const |
Definition at line 1194 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 1833 of file MachOObjectFile.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin().
Referenced by load_commands().
| iterator_range<bind_iterator> llvm::object::MachOObjectFile::bindTable | ( | ) | const |
For use iterating over all bind table entries.
Referenced by lazyBindTable(), and weakBindTable().
|
static |
For use examining bind opcodes not in a MachOObjectFile.
Definition at line 422 of file Object/MachO.h.
References llvm::object::Binary::isMachO().
| dice_iterator MachOObjectFile::end_dices | ( | ) | const |
Definition at line 1204 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 1838 of file MachOObjectFile.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::end().
Referenced by load_commands().
| iterator_range<export_iterator> llvm::object::MachOObjectFile::exports | ( | ) | const |
For use iterating over all exported symbols.
|
static |
For use examining a trie not in a MachOObjectFile.
Definition at line 1376 of file MachOObjectFile.cpp.
References llvm::ArrayRef< T >::size().
| unsigned MachOObjectFile::getAnyRelocationAddress | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1907 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 1921 of file MachOObjectFile.cpp.
References getPlainRelocationLength(), getScatteredRelocationLength(), and isRelocationScattered().
Referenced by llvm::RuntimeDyldMachO::getRelocationEntry(), getRelocationLength(), and llvm::RuntimeDyldMachOAArch64::processRelocationRef().
| unsigned MachOObjectFile::getAnyRelocationPCRel | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1914 of file MachOObjectFile.cpp.
References getPlainRelocationPCRel(), getScatteredRelocationPCRel(), and isRelocationScattered().
Referenced by llvm::RuntimeDyldMachO::getRelocationEntry(), and llvm::RuntimeDyldMachOAArch64::processRelocationRef().
| SectionRef MachOObjectFile::getAnyRelocationSection | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1937 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, getPlainRelocationExternal(), getPlainRelocationSymbolNum(), isRelocationScattered(), llvm::MachO::R_ABS, section_end(), llvm::object::ObjectFile::SectionRef, and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by getRelocationSection(), and llvm::RuntimeDyldMachO::getRelocationValueRef().
| unsigned MachOObjectFile::getAnyRelocationType | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1929 of file MachOObjectFile.cpp.
References getPlainRelocationType(), getScatteredRelocationType(), and isRelocationScattered().
Referenced by llvm::RuntimeDyldMachO::getRelocationEntry(), getRelocationType(), llvm::RuntimeDyldMachOI386::processRelocationRef(), llvm::RuntimeDyldMachOARM::processRelocationRef(), and llvm::RuntimeDyldMachOAArch64::processRelocationRef().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Referenced by getArch(), llvm::object::MachOUniversalBinary::ObjectForArch::getArchTypeName(), and getRelocationTypeName().
| Triple llvm::object::MachOObjectFile::getArch | ( | const char ** | McpuDefault, |
| Triple * | ThumbTriple | ||
| ) | const |
|
static |
Definition at line 998 of file MachOObjectFile.cpp.
References llvm::Triple::aarch64, llvm::Triple::arm, llvm::MachO::CPU_TYPE_ARM, llvm::MachO::CPU_TYPE_ARM64, 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 |
|
static |
Definition at line 1138 of file MachOObjectFile.cpp.
References getArch(), getThumbArch(), and T.
|
overridevirtual |
The number of bytes used to represent an address in this object file format.
Implements llvm::object::ObjectFile.
Definition at line 967 of file MachOObjectFile.cpp.
References is64Bit().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 388 of file MachOObjectFile.cpp.
References getNValue().
| MachO::linkedit_data_command MachOObjectFile::getDataInCodeLoadCommand | ( | ) | const |
Definition at line 2181 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::cmd, and llvm::MachO::LC_DATA_IN_CODE.
Referenced by begin_dices(), and end_dices().
| MachO::data_in_code_entry MachOObjectFile::getDataInCodeTableEntry | ( | uint32_t | DataOffset, |
| unsigned | Index | ||
| ) | const |
Definition at line 2130 of file MachOObjectFile.cpp.
References getPtr().
| MachO::data_in_code_entry MachOObjectFile::getDice | ( | DataRefImpl | Rel | ) | const |
Definition at line 2108 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().
| ArrayRef< uint8_t > MachOObjectFile::getDyldInfoBindOpcodes | ( | ) | const |
Definition at line 2220 of file MachOObjectFile.cpp.
References getPtr().
| ArrayRef< uint8_t > MachOObjectFile::getDyldInfoExportsTrie | ( | ) | const |
Definition at line 2253 of file MachOObjectFile.cpp.
References getPtr().
| ArrayRef< uint8_t > MachOObjectFile::getDyldInfoLazyBindOpcodes | ( | ) | const |
Definition at line 2242 of file MachOObjectFile.cpp.
References getPtr().
Referenced by lazyBindTable().
| MachO::dyld_info_command MachOObjectFile::getDyldInfoLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2014 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| ArrayRef< uint8_t > MachOObjectFile::getDyldInfoRebaseOpcodes | ( | ) | const |
Definition at line 2209 of file MachOObjectFile.cpp.
References getPtr().
| ArrayRef< uint8_t > MachOObjectFile::getDyldInfoWeakBindOpcodes | ( | ) | const |
Definition at line 2231 of file MachOObjectFile.cpp.
References getPtr().
Referenced by weakBindTable().
| MachO::dylib_command MachOObjectFile::getDylibIDLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2009 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::dylinker_command MachOObjectFile::getDylinkerCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2019 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::dysymtab_command MachOObjectFile::getDysymtabLoadCommand | ( | ) | const |
Definition at line 2151 of file MachOObjectFile.cpp.
References llvm::MachO::dysymtab_command::cmd, and llvm::MachO::LC_DYSYMTAB.
Referenced by llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection().
| MachO::encryption_info_command MachOObjectFile::getEncryptionInfoCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2044 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::encryption_info_command_64 MachOObjectFile::getEncryptionInfoCommand64 | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2049 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::entry_point_command MachOObjectFile::getEntryPointCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2039 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 971 of file MachOObjectFile.cpp.
References llvm::MachO::CPU_TYPE_ARM, llvm::MachO::CPU_TYPE_ARM64, llvm::MachO::CPU_TYPE_I386, llvm::MachO::CPU_TYPE_POWERPC, llvm::MachO::CPU_TYPE_POWERPC64, llvm::MachO::CPU_TYPE_X86_64, getCPUType(), and is64Bit().
| const MachO::mach_header & MachOObjectFile::getHeader | ( | ) | const |
Definition at line 2113 of file MachOObjectFile.cpp.
References Header.
Referenced by getRelocationOffset(), isRelocatableObject(), and MachOObjectFile().
| const MachO::mach_header_64 & MachOObjectFile::getHeader64 | ( | ) | const |
Definition at line 2117 of file MachOObjectFile.cpp.
|
static |
Definition at line 1147 of file MachOObjectFile.cpp.
References llvm::sys::getDefaultTargetTriple().
| std::error_code MachOObjectFile::getIndirectName | ( | DataRefImpl | Symb, |
| StringRef & | Res | ||
| ) | const |
Definition at line 357 of file MachOObjectFile.cpp.
References llvm::StringRef::data(), getNValue(), getStringTableData(), getSymbolTableEntryBase(), llvm::MachO::N_INDR, llvm::MachO::N_TYPE, llvm::MachO::nlist_base::n_type, llvm::object::parse_failed, and llvm::StringRef::size().
| uint32_t MachOObjectFile::getIndirectSymbolTableEntry | ( | const MachO::dysymtab_command & | DLC, |
| unsigned | Index | ||
| ) | const |
Definition at line 2122 of file MachOObjectFile.cpp.
References getPtr(), and llvm::MachO::dysymtab_command::indirectsymoff.
Referenced by llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection().
| std::error_code MachOObjectFile::getLibraryShortNameByIndex | ( | unsigned | Index, |
| StringRef & | Res | ||
| ) | const |
Definition at line 884 of file MachOObjectFile.cpp.
References llvm::MachO::dylib_command::cmdsize, llvm::MachO::dylib_command::dylib, llvm::StringRef::empty(), guessLibraryShortName(), llvm::MachO::dylib::name, P, llvm::object::parse_failed, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::StringRef::size(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
| MachO::linkedit_data_command MachOObjectFile::getLinkeditDataLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 1984 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::linker_option_command MachOObjectFile::getLinkerOptionLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 1999 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::linkedit_data_command MachOObjectFile::getLinkOptHintsLoadCommand | ( | ) | const |
Definition at line 2195 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::cmd, and llvm::MachO::LC_LINKER_OPTIMIZATION_HINT.
| uint64_t MachOObjectFile::getNValue | ( | DataRefImpl | Sym | ) | const |
Definition at line 346 of file MachOObjectFile.cpp.
References getSymbol64TableEntry(), getSymbolTableEntry(), is64Bit(), llvm::MachO::nlist::n_value, and llvm::MachO::nlist_64::n_value.
Referenced by getCommonSymbolSizeImpl(), getIndirectName(), and getSymbolFlags().
| bool MachOObjectFile::getPlainRelocationExternal | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1885 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(), and llvm::RuntimeDyldMachOAArch64::processRelocationRef().
| unsigned MachOObjectFile::getPlainRelocationSymbolNum | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1878 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 2089 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::b, llvm::object::DataRefImpl::d, getPtr(), getSection(), getSection64(), is64Bit(), P, llvm::MachO::section::reloff, and llvm::MachO::section_64::reloff.
Referenced by llvm::RuntimeDyldMachO::getRelocationEntry(), getRelocationLength(), getRelocationOffset(), getRelocationSection(), getRelocationSymbol(), getRelocationType(), llvm::RuntimeDyldMachO::getRelocationValueRef(), llvm::RuntimeDyldMachOI386::processRelocationRef(), llvm::RuntimeDyldMachOX86_64::processRelocationRef(), llvm::RuntimeDyldMachOARM::processRelocationRef(), and llvm::RuntimeDyldMachOAArch64::processRelocationRef().
| uint8_t MachOObjectFile::getRelocationLength | ( | DataRefImpl | Rel | ) | const |
Definition at line 732 of file MachOObjectFile.cpp.
References getAnyRelocationLength(), and getRelocation().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 585 of file MachOObjectFile.cpp.
References getAnyRelocationAddress(), getHeader(), getRelocation(), and llvm::MachO::MH_OBJECT.
| section_iterator MachOObjectFile::getRelocationRelocatedSection | ( | relocation_iterator | Rel | ) | const |
Definition at line 916 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 614 of file MachOObjectFile.cpp.
References getAnyRelocationSection(), and getRelocation().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 593 of file MachOObjectFile.cpp.
References getPlainRelocationExternal(), getPlainRelocationSymbolNum(), getPtr(), getRelocation(), getSymtabLoadCommand(), is64Bit(), isRelocationScattered(), llvm::object::DataRefImpl::p, llvm::object::SymbolicFile::symbol_end(), llvm::object::ObjectFile::SymbolRef, and llvm::MachO::symtab_command::symoff.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 618 of file MachOObjectFile.cpp.
References getAnyRelocationType(), and getRelocation().
Referenced by getRelocationTypeName().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 623 of file MachOObjectFile.cpp.
References llvm::Triple::aarch64, llvm::SmallVectorImpl< T >::append(), 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 2074 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::routines_command_64 MachOObjectFile::getRoutinesCommand64 | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2079 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::rpath_command MachOObjectFile::getRpathCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2029 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| bool MachOObjectFile::getScatteredRelocationScattered | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1892 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 1902 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 1897 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word1.
| MachO::section llvm::object::MachOObjectFile::getSection | ( | DataRefImpl | DRI | ) | const |
| MachO::section llvm::object::MachOObjectFile::getSection | ( | const LoadCommandInfo & | L, |
| unsigned | Index | ||
| ) | const |
| MachO::section_64 llvm::object::MachOObjectFile::getSection64 | ( | DataRefImpl | DRI | ) | const |
Referenced by getRelocation(), getSectionAddress(), getSectionAlignment(), getSectionContents(), and getSectionSize().
| MachO::section_64 llvm::object::MachOObjectFile::getSection64 | ( | const LoadCommandInfo & | L, |
| unsigned | Index | ||
| ) | const |
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 483 of file MachOObjectFile.cpp.
References llvm::MachO::section::addr, llvm::MachO::section_64::addr, getSection(), getSection64(), and is64Bit().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 514 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 495 of file MachOObjectFile.cpp.
References llvm::object::Binary::getData(), getSection(), getSection64(), is64Bit(), llvm::MachO::section::offset, llvm::MachO::section_64::offset, llvm::MachO::section::size, llvm::MachO::section_64::size, and llvm::StringRef::substr().
| StringRef MachOObjectFile::getSectionFinalSegmentName | ( | DataRefImpl | Sec | ) | const |
Definition at line 1849 of file MachOObjectFile.cpp.
References llvm::ArrayRef< T >::data(), getSectionRawFinalSegmentName(), and parseSegmentOrSectionName().
| unsigned MachOObjectFile::getSectionID | ( | SectionRef | Sec | ) | const |
Definition at line 548 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 476 of file MachOObjectFile.cpp.
References llvm::ArrayRef< T >::data(), getSectionRawName(), and parseSegmentOrSectionName().
| ArrayRef< char > MachOObjectFile::getSectionRawFinalSegmentName | ( | DataRefImpl | Sec | ) | const |
Definition at line 1863 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, llvm::makeArrayRef(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by getSectionFinalSegmentName().
| ArrayRef< char > MachOObjectFile::getSectionRawName | ( | DataRefImpl | Sec | ) | const |
Definition at line 1855 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, llvm::makeArrayRef(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by getSectionName().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 489 of file MachOObjectFile.cpp.
References getSection(), getSection64(), is64Bit(), llvm::MachO::section::size, and llvm::MachO::section_64::size.
| unsigned MachOObjectFile::getSectionType | ( | SectionRef | Sec | ) | const |
Definition at line 340 of file MachOObjectFile.cpp.
References llvm::object::SectionRef::getRawDataRefImpl(), getSectionFlags(), and llvm::MachO::SECTION_TYPE.
| MachO::segment_command_64 MachOObjectFile::getSegment64LoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 1994 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::segment_command MachOObjectFile::getSegmentLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 1989 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::source_version_command MachOObjectFile::getSourceVersionCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2034 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| StringRef MachOObjectFile::getStringTableData | ( | ) | const |
Definition at line 2272 of file MachOObjectFile.cpp.
References llvm::object::Binary::getData(), getSymtabLoadCommand(), llvm::MachO::symtab_command::stroff, llvm::MachO::symtab_command::strsize, and llvm::StringRef::substr().
Referenced by getIndirectName(), and getSymbolName().
| MachO::sub_client_command MachOObjectFile::getSubClientCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2069 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::sub_framework_command MachOObjectFile::getSubFrameworkCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2054 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::sub_library_command MachOObjectFile::getSubLibraryCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2064 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::sub_umbrella_command MachOObjectFile::getSubUmbrellaCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2059 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::nlist_64 MachOObjectFile::getSymbol64TableEntry | ( | DataRefImpl | DRI | ) | const |
Definition at line 1978 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by getNValue().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 375 of file MachOObjectFile.cpp.
References llvm::object::ObjectFile::getSymbolValue().
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 379 of file MachOObjectFile.cpp.
References llvm::MachO::GET_COMM_ALIGN(), getSymbolFlags(), getSymbolTableEntryBase(), llvm::MachO::nlist_base::n_desc, and llvm::object::BasicSymbolRef::SF_Common.
| basic_symbol_iterator MachOObjectFile::getSymbolByIndex | ( | unsigned | Index | ) | const |
Definition at line 941 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, and llvm::MachO::symtab_command::symoff.
Referenced by llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection(), and symbol_begin_impl().
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 409 of file MachOObjectFile.cpp.
References getNValue(), getSymbolTableEntryBase(), llvm::MachO::N_ABS, llvm::MachO::N_ARM_THUMB_DEF, llvm::MachO::nlist_base::n_desc, llvm::MachO::N_EXT, llvm::MachO::N_INDR, llvm::MachO::N_PEXT, llvm::MachO::N_STAB, llvm::MachO::N_TYPE, llvm::MachO::nlist_base::n_type, llvm::MachO::N_UNDF, llvm::MachO::N_WEAK_DEF, llvm::MachO::N_WEAK_REF, llvm::object::BasicSymbolRef::SF_Absolute, llvm::object::BasicSymbolRef::SF_Common, llvm::object::BasicSymbolRef::SF_Exported, llvm::object::BasicSymbolRef::SF_FormatSpecific, llvm::object::BasicSymbolRef::SF_Global, llvm::object::BasicSymbolRef::SF_Indirect, llvm::object::BasicSymbolRef::SF_None, llvm::object::BasicSymbolRef::SF_Thumb, llvm::object::BasicSymbolRef::SF_Undefined, and llvm::object::BasicSymbolRef::SF_Weak.
Referenced by getSymbolAlignment().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 330 of file MachOObjectFile.cpp.
References llvm::sys::path::begin(), llvm::StringRef::data(), llvm::sys::path::end(), llvm::object::Binary::getData(), getStringTableData(), getSymbolTableEntryBase(), llvm::MachO::nlist_base::n_strx, and llvm::report_fatal_error().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 448 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, getSymbolTableEntryBase(), llvm::MachO::nlist_base::n_sect, llvm::report_fatal_error(), section_end(), llvm::object::ObjectFile::SectionRef, and llvm::SmallVectorTemplateCommon< T, typename >::size().
Definition at line 466 of file MachOObjectFile.cpp.
References llvm::object::BasicSymbolRef::getRawDataRefImpl(), getSymbolTableEntryBase(), and llvm::MachO::nlist_base::n_sect.
| MachO::nlist MachOObjectFile::getSymbolTableEntry | ( | DataRefImpl | DRI | ) | const |
Definition at line 1972 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by getNValue().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 392 of file MachOObjectFile.cpp.
References getSymbolTableEntryBase(), llvm::MachO::N_SECT, llvm::MachO::N_STAB, llvm::MachO::N_TYPE, llvm::MachO::nlist_base::n_type, llvm::MachO::N_UNDF, llvm::object::SymbolRef::ST_Debug, llvm::object::SymbolRef::ST_Function, llvm::object::SymbolRef::ST_Other, and llvm::object::SymbolRef::ST_Unknown.
| MachO::symtab_command MachOObjectFile::getSymtabLoadCommand | ( | ) | const |
Definition at line 2136 of file MachOObjectFile.cpp.
References llvm::MachO::symtab_command::cmd, and llvm::MachO::LC_SYMTAB.
Referenced by getRelocationSymbol(), getStringTableData(), getSymbolByIndex(), and symbol_end_impl().
| MachO::thread_command MachOObjectFile::getThreadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2084 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
static |
Definition at line 1096 of file MachOObjectFile.cpp.
References llvm::MachO::CPU_SUBTYPE_ARM_V4T, llvm::MachO::CPU_SUBTYPE_ARM_V5TEJ, llvm::MachO::CPU_SUBTYPE_ARM_V6, llvm::MachO::CPU_SUBTYPE_ARM_V6M, llvm::MachO::CPU_SUBTYPE_ARM_V7, llvm::MachO::CPU_SUBTYPE_ARM_V7EM, llvm::MachO::CPU_SUBTYPE_ARM_V7K, llvm::MachO::CPU_SUBTYPE_ARM_V7M, llvm::MachO::CPU_SUBTYPE_ARM_V7S, llvm::MachO::CPU_SUBTYPE_ARM_XSCALE, llvm::MachO::CPU_SUBTYPE_MASK, and llvm::MachO::CPU_TYPE_ARM.
Referenced by getArch().
| ArrayRef< uint8_t > MachOObjectFile::getUuid | ( | ) | const |
Definition at line 2264 of file MachOObjectFile.cpp.
| MachO::uuid_command MachOObjectFile::getUuidCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2024 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::version_min_command MachOObjectFile::getVersionMinLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 2004 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
static |
Definition at line 765 of file MachOObjectFile.cpp.
References F(), llvm::StringRef::find(), llvm::StringRef::npos, llvm::StringRef::rfind(), llvm::StringRef::size(), llvm::StringRef::slice(), and llvm::StringRef::startswith().
Referenced by getLibraryShortNameByIndex().
|
inline |
Definition at line 420 of file Object/MachO.h.
| bool MachOObjectFile::is64Bit | ( | ) | const |
Definition at line 2277 of file MachOObjectFile.cpp.
References llvm::object::Binary::getMachOType(), and llvm::object::Binary::getType().
Referenced by getBytesInAddress(), getFileFormatName(), getHeader64(), getNValue(), getRelocation(), getRelocationSymbol(), getSectionAddress(), getSectionAlignment(), getSectionContents(), getSectionSize(), getSymbolByIndex(), lazyBindTable(), MachOObjectFile(), moveSymbolNext(), llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection(), symbol_end_impl(), and weakBindTable().
|
overridevirtual |
True if this is a relocatable object (.o/.obj).
Implements llvm::object::ObjectFile.
Definition at line 2294 of file MachOObjectFile.cpp.
References llvm::MachO::mach_header::filetype, getHeader(), and llvm::MachO::MH_OBJECT.
| bool MachOObjectFile::isRelocationScattered | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1871 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 |
Implements llvm::object::ObjectFile.
Definition at line 540 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 532 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 527 of file MachOObjectFile.cpp.
References getSectionFlags(), and llvm::MachO::S_ATTR_PURE_INSTRUCTIONS.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 552 of file MachOObjectFile.cpp.
Definition at line 1151 of file MachOObjectFile.cpp.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Default().
| iterator_range< bind_iterator > MachOObjectFile::lazyBindTable | ( | ) | const |
For use iterating over all lazy bind table entries.
Definition at line 1822 of file MachOObjectFile.cpp.
References bindTable(), getDyldInfoLazyBindOpcodes(), is64Bit(), and llvm::object::MachOBindEntry::Lazy.
| iterator_range< MachOObjectFile::load_command_iterator > MachOObjectFile::load_commands | ( | ) | const |
Definition at line 1843 of file MachOObjectFile.cpp.
References begin_load_commands(), and end_load_commands().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 581 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::b, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 472 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 323 of file MachOObjectFile.cpp.
References is64Bit(), and llvm::object::DataRefImpl::p.
| void MachOObjectFile::ReadULEB128s | ( | uint64_t | Index, |
| SmallVectorImpl< uint64_t > & | Out | ||
| ) | const |
Definition at line 2282 of file MachOObjectFile.cpp.
References llvm::object::Binary::getData(), llvm::DataExtractor::getULEB128(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
| iterator_range<rebase_iterator> llvm::object::MachOObjectFile::rebaseTable | ( | ) | const |
For use iterating over all rebase table entries.
|
static |
For use examining rebase opcodes not in a MachOObjectFile.
Definition at line 1551 of file MachOObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 956 of file MachOObjectFile.cpp.
References llvm::object::ObjectFile::SectionRef.
Referenced by llvm::RuntimeDyldMachO::getSectionByAddress().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 961 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, llvm::object::ObjectFile::SectionRef, and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by getAnyRelocationSection(), llvm::RuntimeDyldMachO::getSectionByAddress(), and getSymbolSection().
|
overridevirtual |
Implements llvm::object::ObjectFile.
| relocation_iterator llvm::object::MachOObjectFile::section_rel_begin | ( | unsigned | Index | ) | const |
|
overridevirtual |
Implements llvm::object::ObjectFile.
| relocation_iterator llvm::object::MachOObjectFile::section_rel_end | ( | unsigned | Index | ) | const |
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 922 of file MachOObjectFile.cpp.
References getSymbolByIndex().
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 926 of file MachOObjectFile.cpp.
References getPtr(), getSymtabLoadCommand(), is64Bit(), llvm::MachO::symtab_command::nsyms, llvm::object::DataRefImpl::p, llvm::object::ObjectFile::SymbolRef, and llvm::MachO::symtab_command::symoff.
| iterator_range< bind_iterator > MachOObjectFile::weakBindTable | ( | ) | const |
For use iterating over all lazy bind table entries.
Definition at line 1827 of file MachOObjectFile.cpp.
References bindTable(), getDyldInfoWeakBindOpcodes(), is64Bit(), and llvm::object::MachOBindEntry::Weak.
| MachO::mach_header llvm::object::MachOObjectFile::Header |
Definition at line 431 of file Object/MachO.h.
Referenced by getHeader(), and MachOObjectFile().
| MachO::mach_header_64 llvm::object::MachOObjectFile::Header64 |
Definition at line 430 of file Object/MachO.h.
Referenced by getHeader64(), and MachOObjectFile().
1.8.6