|
LLVM
5.0.0
|
#include "llvm/Object/MachO.h"
Classes | |
| struct | LoadCommandInfo |
Public Types | |
| using | LoadCommandList = SmallVector< LoadCommandInfo, 4 > |
| using | load_command_iterator = LoadCommandList::const_iterator |
Public Types inherited from llvm::object::ObjectFile | |
| using | symbol_iterator_range = iterator_range< symbol_iterator > |
| using | section_iterator_range = iterator_range< section_iterator > |
Public Types inherited from llvm::object::SymbolicFile | |
| using | basic_symbol_iterator_range = iterator_range< basic_symbol_iterator > |
| dice_iterator MachOObjectFile::begin_dices | ( | ) | const |
Definition at line 2589 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 3834 of file MachOObjectFile.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin().
Referenced by load_commands().
|
inline |
For use in MachOBindEntry::moveNext() to validate a MachOBindEntry for the BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB opcode.
Definition at line 398 of file MachO.h.
Referenced by llvm::object::MachOBindEntry::moveNext().
|
inline |
For use with a SegIndex,SegOffset pair in MachOBindEntry::moveNext() to validate a MachOBindEntry.
Definition at line 391 of file MachO.h.
Referenced by llvm::object::MachOBindEntry::moveNext().
|
inline |
For use with a SegIndex,SegOffset pair from a checked Mach-O Bind or Rebase entry to get the address.
Definition at line 435 of file MachO.h.
Referenced by llvm::object::MachORebaseEntry::address(), and llvm::object::MachOBindEntry::address().
|
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 429 of file MachO.h.
Referenced by llvm::object::MachORebaseEntry::sectionName(), and llvm::object::MachOBindEntry::sectionName().
|
inline |
For use with the SegIndex of a checked Mach-O Bind or Rebase entry to get the segment name.
Definition at line 423 of file MachO.h.
Referenced by llvm::object::MachORebaseEntry::segmentName(), and llvm::object::MachOBindEntry::segmentName().
| iterator_range< bind_iterator > MachOObjectFile::bindTable | ( | Error & | Err | ) |
For use iterating over all bind table entries.
Definition at line 3818 of file MachOObjectFile.cpp.
References getDyldInfoBindOpcodes(), is64Bit(), and llvm::object::MachOBindEntry::Regular.
Referenced by lazyBindTable(), and weakBindTable().
|
static |
For use examining bind opcodes in a MachOObjectFile.
| Error MachOObjectFile::checkSymbolTable | ( | ) | const |
Definition at line 1583 of file MachOObjectFile.cpp.
References llvm::MachO::DYNAMIC_LOOKUP_ORDINAL, llvm::MachO::EXECUTABLE_ORDINAL, Flags, llvm::MachO::mach_header::flags, 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, llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::MachO::symtab_command::strsize, llvm::Error::success(), llvm::ARMBuildAttrs::Symbol, and llvm::object::ObjectFile::symbols().
Definition at line 563 of file MachO.h.
References llvm::object::Binary::isMachO().
|
static |
Definition at line 1150 of file MachOObjectFile.cpp.
References llvm::Error::success().
Referenced by llvm::object::ObjectFile::createMachOObjectFile().
| dice_iterator MachOObjectFile::end_dices | ( | ) | const |
Definition at line 2599 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 3839 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 2767 of file MachOObjectFile.cpp.
References llvm::ArrayRef< T >::empty(), and llvm::make_range().
|
inline |
Definition at line 309 of file MachO.h.
References extrel_begin(), extrel_end(), and llvm::make_range().
| relocation_iterator MachOObjectFile::extrel_begin | ( | ) | const |
Definition at line 1954 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::b, llvm::object::DataRefImpl::d, llvm::object::ObjectFile::RelocationRef, and llvm::MipsISD::Ret.
Referenced by external_relocations().
| relocation_iterator MachOObjectFile::extrel_end | ( | ) | const |
Definition at line 1961 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::b, llvm::object::DataRefImpl::d, getDysymtabLoadCommand(), llvm::MachO::dysymtab_command::nextrel, llvm::object::ObjectFile::RelocationRef, and llvm::MipsISD::Ret.
Referenced by external_relocations().
| unsigned MachOObjectFile::getAnyRelocationAddress | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 3907 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 3921 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 3914 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 3937 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 3929 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 2405 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 |
|
inlinestatic |
Definition at line 585 of file MachO.h.
References llvm::format_hex(), llvm::MachO::PLATFORM_BRIDGEOS, llvm::MachO::PLATFORM_IOS, llvm::MachO::PLATFORM_MACOS, llvm::MachO::PLATFORM_TVOS, llvm::MachO::PLATFORM_WATCHOS, and llvm::raw_string_ostream::str().
|
inlinestatic |
Definition at line 600 of file MachO.h.
References llvm::format_hex(), llvm::raw_string_ostream::str(), llvm::MachO::TOOL_CLANG, llvm::MachO::TOOL_LD, and llvm::MachO::TOOL_SWIFT.
| MachO::build_tool_version MachOObjectFile::getBuildToolVersion | ( | unsigned | index | ) | const |
Definition at line 4019 of file MachOObjectFile.cpp.
| MachO::build_version_command MachOObjectFile::getBuildVersionLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4014 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 2374 of file MachOObjectFile.cpp.
References is64Bit().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1717 of file MachOObjectFile.cpp.
References getNValue().
| MachO::linkedit_data_command MachOObjectFile::getDataInCodeLoadCommand | ( | ) | const |
Definition at line 4201 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::cmd.
Referenced by begin_dices(), and end_dices().
| MachO::data_in_code_entry MachOObjectFile::getDataInCodeTableEntry | ( | uint32_t | DataOffset, |
| unsigned | Index | ||
| ) | const |
Definition at line 4150 of file MachOObjectFile.cpp.
References getPtr().
| MachO::data_in_code_entry MachOObjectFile::getDice | ( | DataRefImpl | Rel | ) | const |
Definition at line 4128 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 4240 of file MachOObjectFile.cpp.
References llvm::MachO::dyld_info_command::bind_off, llvm::MachO::dyld_info_command::bind_size, getPtr(), llvm::makeArrayRef(), and None.
Referenced by bindTable().
| ArrayRef< uint8_t > MachOObjectFile::getDyldInfoExportsTrie | ( | ) | const |
Definition at line 4273 of file MachOObjectFile.cpp.
References llvm::MachO::dyld_info_command::export_off, llvm::MachO::dyld_info_command::export_size, getPtr(), llvm::makeArrayRef(), and None.
| ArrayRef< uint8_t > MachOObjectFile::getDyldInfoLazyBindOpcodes | ( | ) | const |
Definition at line 4262 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 None.
Referenced by lazyBindTable().
| MachO::dyld_info_command MachOObjectFile::getDyldInfoLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4029 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| ArrayRef< uint8_t > MachOObjectFile::getDyldInfoRebaseOpcodes | ( | ) | const |
Definition at line 4229 of file MachOObjectFile.cpp.
References getPtr(), llvm::makeArrayRef(), None, llvm::MachO::dyld_info_command::rebase_off, and llvm::MachO::dyld_info_command::rebase_size.
Referenced by rebaseTable().
| ArrayRef< uint8_t > MachOObjectFile::getDyldInfoWeakBindOpcodes | ( | ) | const |
Definition at line 4251 of file MachOObjectFile.cpp.
References getPtr(), llvm::makeArrayRef(), None, llvm::MachO::dyld_info_command::weak_bind_off, and llvm::MachO::dyld_info_command::weak_bind_size.
Referenced by weakBindTable().
| MachO::dylib_command MachOObjectFile::getDylibIDLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4024 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::dylinker_command MachOObjectFile::getDylinkerCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4034 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::dysymtab_command MachOObjectFile::getDysymtabLoadCommand | ( | ) | const |
Definition at line 4171 of file MachOObjectFile.cpp.
References llvm::MachO::dysymtab_command::cmd.
Referenced by extrel_end(), getRelocation(), and llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection().
| MachO::encryption_info_command MachOObjectFile::getEncryptionInfoCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4059 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::encryption_info_command_64 MachOObjectFile::getEncryptionInfoCommand64 | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4064 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::entry_point_command MachOObjectFile::getEntryPointCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4054 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
inlineoverridevirtual |
Implements llvm::object::ObjectFile.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2378 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 4133 of file MachOObjectFile.cpp.
References Header.
Referenced by checkSymbolTable(), getRelocation(), getRelocationOffset(), and isRelocatableObject().
| const MachO::mach_header_64 & MachOObjectFile::getHeader64 | ( | ) | const |
Definition at line 4137 of file MachOObjectFile.cpp.
References assert(), Header64, and is64Bit().
Referenced by checkSymbolTable().
|
static |
Definition at line 2544 of file MachOObjectFile.cpp.
References llvm::sys::getDefaultTargetTriple().
| std::error_code MachOObjectFile::getIndirectName | ( | DataRefImpl | Symb, |
| StringRef & | Res | ||
| ) | const |
Definition at line 1686 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 4142 of file MachOObjectFile.cpp.
References getPtr(), and llvm::MachO::dysymtab_command::indirectsymoff.
Referenced by llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection().
| uint32_t MachOObjectFile::getLibraryCount | ( | ) | const |
Definition at line 2304 of file MachOObjectFile.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::object::MachOBindEntry::moveNext().
| std::error_code MachOObjectFile::getLibraryShortNameByIndex | ( | unsigned | Index, |
| StringRef & | Res | ||
| ) | const |
Definition at line 2273 of file MachOObjectFile.cpp.
References llvm::MachO::dylib_command::cmdsize, D, llvm::MachO::dylib_command::dylib, llvm::StringRef::empty(), guessLibraryShortName(), llvm::MachO::dylib::name, Name, P, llvm::object::parse_failed, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::StringRef::size().
| MachO::linkedit_data_command MachOObjectFile::getLinkeditDataLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3984 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::linker_option_command MachOObjectFile::getLinkerOptionLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3999 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::linkedit_data_command MachOObjectFile::getLinkOptHintsLoadCommand | ( | ) | const |
Definition at line 4215 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::cmd.
| MachO::note_command MachOObjectFile::getNoteLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4009 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| uint64_t MachOObjectFile::getNValue | ( | DataRefImpl | Sym | ) | const |
Definition at line 1675 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 3885 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 3878 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 4104 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::MH_OBJECT, 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(), llvm::RuntimeDyldMachOAArch64::processRelocationRef(), and llvm::RuntimeDyldMachO::processScatteredVANILLA().
| uint8_t MachOObjectFile::getRelocationLength | ( | DataRefImpl | Rel | ) | const |
Definition at line 2121 of file MachOObjectFile.cpp.
References getAnyRelocationLength(), and getRelocation().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1973 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 2309 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 2003 of file MachOObjectFile.cpp.
References getAnyRelocationSection(), and getRelocation().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1982 of file MachOObjectFile.cpp.
References getPlainRelocationExternal(), getPlainRelocationSymbolNum(), getPtr(), getRelocation(), getSymtabLoadCommand(), is64Bit(), isRelocationScattered(), llvm::object::DataRefImpl::p, symbol_end(), llvm::object::ObjectFile::SymbolRef, and llvm::MachO::symtab_command::symoff.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2007 of file MachOObjectFile.cpp.
References getAnyRelocationType(), and getRelocation().
Referenced by getRelocationTypeName().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2012 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 4089 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::routines_command_64 MachOObjectFile::getRoutinesCommand64 | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4094 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::rpath_command MachOObjectFile::getRpathCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4044 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| bool MachOObjectFile::getScatteredRelocationScattered | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 3892 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 3902 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 3897 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word1.
Referenced by llvm::RuntimeDyldMachO::processScatteredVANILLA().
| 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 1817 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 1875 of file MachOObjectFile.cpp.
References llvm::AMDGPU::CodeObject::Kernel::Arg::Key::Align, llvm::MachO::section::align, llvm::MachO::section_64::align, getSection(), getSection64(), and is64Bit().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1856 of file MachOObjectFile.cpp.
References llvm::object::Binary::getData(), getSection(), getSection64(), is64Bit(), llvm::MachO::section::offset, llvm::MachO::section_64::offset, llvm::AMDGPU::CodeObject::Kernel::Arg::Key::Size, llvm::MachO::section::size, llvm::MachO::section_64::size, and llvm::StringRef::substr().
| StringRef MachOObjectFile::getSectionFinalSegmentName | ( | DataRefImpl | Sec | ) | const |
Definition at line 3849 of file MachOObjectFile.cpp.
References llvm::ArrayRef< T >::data(), getSectionRawFinalSegmentName(), and parseSegmentOrSectionName().
Referenced by llvm::object::BindRebaseSegInfo::BindRebaseSegInfo(), and isSectionBitcode().
| unsigned MachOObjectFile::getSectionID | ( | SectionRef | Sec | ) | const |
Definition at line 1913 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 1823 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1810 of file MachOObjectFile.cpp.
References llvm::ArrayRef< T >::data(), getSectionRawName(), and parseSegmentOrSectionName().
Referenced by isSectionBitcode().
| ArrayRef< char > MachOObjectFile::getSectionRawFinalSegmentName | ( | DataRefImpl | Sec | ) | const |
Definition at line 3863 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, assert(), llvm::object::DataRefImpl::d, and llvm::makeArrayRef().
Referenced by getSectionFinalSegmentName().
| ArrayRef< char > MachOObjectFile::getSectionRawName | ( | DataRefImpl | Sec | ) | const |
Definition at line 3855 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, assert(), llvm::object::DataRefImpl::d, and llvm::makeArrayRef().
Referenced by getSectionName().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1827 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 1669 of file MachOObjectFile.cpp.
References Flags, llvm::object::SectionRef::getRawDataRefImpl(), getSectionFlags(), and llvm::MachO::SECTION_TYPE.
| MachO::segment_command_64 MachOObjectFile::getSegment64LoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3994 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::segment_command MachOObjectFile::getSegmentLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3989 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::source_version_command MachOObjectFile::getSourceVersionCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4049 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| StringRef MachOObjectFile::getStringTableData | ( | ) | const |
Definition at line 4292 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 4084 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::sub_framework_command MachOObjectFile::getSubFrameworkCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4069 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::sub_library_command MachOObjectFile::getSubLibraryCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4079 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::sub_umbrella_command MachOObjectFile::getSubUmbrellaCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4074 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::nlist_64 MachOObjectFile::getSymbol64TableEntry | ( | DataRefImpl | DRI | ) | const |
Definition at line 3978 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by checkSymbolTable(), and getNValue().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1704 of file MachOObjectFile.cpp.
References llvm::object::ObjectFile::getSymbolValue().
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 1708 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 2339 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().
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1745 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().
| uint64_t MachOObjectFile::getSymbolIndex | ( | DataRefImpl | Symb | ) | const |
Definition at line 2351 of file MachOObjectFile.cpp.
References getPtr(), getSymtabLoadCommand(), is64Bit(), llvm::object::DataRefImpl::p, llvm::report_fatal_error(), and llvm::MachO::symtab_command::symoff.
Referenced by getSymbolName(), and getSymbolSection().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1658 of file MachOObjectFile.cpp.
References llvm::sys::path::begin(), llvm::StringRef::data(), llvm::sys::path::end(), llvm::object::Binary::getData(), getStringTableData(), getSymbolIndex(), getSymbolTableEntryBase(), malformedError(), and llvm::MachO::nlist_base::n_strx.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1785 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, getSymbolIndex(), getSymbolTableEntryBase(), malformedError(), llvm::MachO::nlist_base::n_sect, section_end(), llvm::object::ObjectFile::SectionRef, and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by getSymbolType().
Definition at line 1800 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 3972 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by checkSymbolTable(), and getNValue().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1722 of file MachOObjectFile.cpp.
References getSymbolSection(), 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_Data, llvm::object::SymbolRef::ST_Debug, llvm::object::SymbolRef::ST_Function, llvm::object::SymbolRef::ST_Other, llvm::object::SymbolRef::ST_Unknown, and llvm::Expected< T >::takeError().
| MachO::symtab_command MachOObjectFile::getSymtabLoadCommand | ( | ) | const |
Definition at line 4156 of file MachOObjectFile.cpp.
References llvm::MachO::symtab_command::cmd.
Referenced by checkSymbolTable(), getRelocationSymbol(), getStringTableData(), getSymbolByIndex(), getSymbolIndex(), symbol_begin(), and symbol_end().
| MachO::thread_command MachOObjectFile::getThreadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4099 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| ArrayRef< uint8_t > MachOObjectFile::getUuid | ( | ) | const |
Definition at line 4284 of file MachOObjectFile.cpp.
References llvm::makeArrayRef(), and None.
| MachO::uuid_command MachOObjectFile::getUuidCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4039 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::version_min_command MachOObjectFile::getVersionMinLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 4004 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
inlinestatic |
Definition at line 568 of file MachO.h.
References fuzzer::return, llvm::MachO::version_min_command::sdk, and llvm::MachO::version_min_command::version.
|
inlinestatic |
Definition at line 574 of file MachO.h.
References fuzzer::return, llvm::MachO::version_min_command::sdk, and llvm::MachO::version_min_command::version.
|
inlinestatic |
Definition at line 580 of file MachO.h.
References llvm::MachO::version_min_command::sdk, and llvm::MachO::version_min_command::version.
|
inlinestatic |
Definition at line 613 of file MachO.h.
References llvm::SmallString< InternalLen >::str(), llvm::utostr(), and llvm::IndexedInstrProf::Version.
|
static |
Definition at line 2154 of file MachOObjectFile.cpp.
References F, llvm::StringRef::find(), Foo(), llvm::StringRef::npos, llvm::StringRef::rfind(), llvm::StringRef::size(), llvm::StringRef::slice(), and llvm::StringRef::startswith().
Referenced by getLibraryShortNameByIndex().
|
inline |
Definition at line 561 of file MachO.h.
Referenced by llvm::object::BindRebaseSegInfo::BindRebaseSegInfo().
| bool MachOObjectFile::is64Bit | ( | ) | const |
Definition at line 4297 of file MachOObjectFile.cpp.
References llvm::object::Binary::getMachOType(), and llvm::object::Binary::getType().
Referenced by bindTable(), checkSymbolTable(), getBytesInAddress(), getFileFormatName(), getHeader64(), getNValue(), getRelocation(), getRelocationSymbol(), getSectionAddress(), getSectionAlignment(), getSectionContents(), getSectionSize(), getSymbolByIndex(), getSymbolIndex(), lazyBindTable(), moveSymbolNext(), llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection(), rebaseTable(), symbol_end(), and weakBindTable().
|
overridevirtual |
True if this is a relocatable object (.o/.obj).
Implements llvm::object::ObjectFile.
Definition at line 4314 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 3871 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 1922 of file MachOObjectFile.cpp.
References getSectionFinalSegmentName(), and getSectionName().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1905 of file MachOObjectFile.cpp.
References Flags, 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 1888 of file MachOObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1897 of file MachOObjectFile.cpp.
References Flags, 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 1892 of file MachOObjectFile.cpp.
References Flags, getSectionFlags(), and llvm::MachO::S_ATTR_PURE_INSTRUCTIONS.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1917 of file MachOObjectFile.cpp.
Definition at line 2548 of file MachOObjectFile.cpp.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Default().
| iterator_range< bind_iterator > MachOObjectFile::lazyBindTable | ( | Error & | Err | ) |
For use iterating over all lazy bind table entries.
Definition at line 3823 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 3844 of file MachOObjectFile.cpp.
References begin_load_commands(), end_load_commands(), and llvm::make_range().
Maps a debug section name to a standard DWARF section name.
Reimplemented from llvm::object::ObjectFile.
Definition at line 4339 of file MachOObjectFile.cpp.
References llvm::StringSwitch< T, R >::Default(), and Name.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1969 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::b, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1806 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1651 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 4302 of file MachOObjectFile.cpp.
References llvm::object::Binary::getData(), llvm::DataExtractor::getULEB128(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
|
inline |
For use in MachORebaseEntry::moveNext() to validate a MachORebaseEntry for the REBASE_OPCODE_DO_*_TIMES* opcodes.
Definition at line 414 of file MachO.h.
Referenced by llvm::object::MachORebaseEntry::moveNext().
|
inline |
For use with a SegIndex,SegOffset pair in MachORebaseEntry::moveNext() to validate a MachORebaseEntry.
Definition at line 407 of file MachO.h.
Referenced by llvm::object::MachORebaseEntry::moveNext().
| iterator_range< rebase_iterator > MachOObjectFile::rebaseTable | ( | Error & | Err | ) |
For use iterating over all rebase table entries.
Definition at line 3160 of file MachOObjectFile.cpp.
References getDyldInfoRebaseOpcodes(), and is64Bit().
|
static |
For use examining rebase opcodes in a MachOObjectFile.
Definition at line 3147 of file MachOObjectFile.cpp.
References llvm::make_range().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2363 of file MachOObjectFile.cpp.
References llvm::object::ObjectFile::SectionRef.
Referenced by llvm::RuntimeDyldMachO::getSectionByAddress().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2368 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(), getSymbolSection(), and llvm::RuntimeDyldMachO::processScatteredVANILLA().
|
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 2315 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 2324 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.
Referenced by getRelocationSymbol().
| iterator_range< bind_iterator > MachOObjectFile::weakBindTable | ( | Error & | Err | ) |
For use iterating over all weak bind table entries.
Definition at line 3828 of file MachOObjectFile.cpp.
References bindTable(), getDyldInfoWeakBindOpcodes(), is64Bit(), and llvm::object::MachOBindEntry::Weak.
| MachO::mach_header llvm::object::MachOObjectFile::Header |
Definition at line 634 of file MachO.h.
Referenced by getHeader().
| MachO::mach_header_64 llvm::object::MachOObjectFile::Header64 |
Definition at line 633 of file MachO.h.
Referenced by getHeader64().
1.8.6