|
LLVM
4.0.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 |
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.
| dice_iterator MachOObjectFile::begin_dices | ( | ) | const |
Definition at line 2479 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 3118 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.
| Error MachOObjectFile::checkSymbolTable | ( | ) | const |
Definition at line 1503 of file MachOObjectFile.cpp.
References llvm::MachO::DYNAMIC_LOOKUP_ORDINAL, llvm::MachO::EXECUTABLE_ORDINAL, fuzzer::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 425 of file Object/MachO.h.
References llvm::object::Binary::isMachO().
|
static |
Definition at line 1072 of file MachOObjectFile.cpp.
References llvm::Error::success().
Referenced by llvm::object::ObjectFile::createMachOObjectFile().
| dice_iterator MachOObjectFile::end_dices | ( | ) | const |
Definition at line 2489 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::dataoff, llvm::MachO::linkedit_data_command::datasize, getDataInCodeLoadCommand(), getPtr(), Offset, and llvm::object::DataRefImpl::p.
| MachOObjectFile::load_command_iterator MachOObjectFile::end_load_commands | ( | ) | const |
Definition at line 3123 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 2660 of file MachOObjectFile.cpp.
References llvm::make_range(), and llvm::ArrayRef< T >::size().
| unsigned MachOObjectFile::getAnyRelocationAddress | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 3191 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 3205 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 3198 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 3221 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 3213 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 2301 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 |
|
overridevirtual |
The number of bytes used to represent an address in this object file format.
Implements llvm::object::ObjectFile.
Definition at line 2270 of file MachOObjectFile.cpp.
References is64Bit().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1637 of file MachOObjectFile.cpp.
References getNValue().
| MachO::linkedit_data_command MachOObjectFile::getDataInCodeLoadCommand | ( | ) | const |
Definition at line 3465 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 3414 of file MachOObjectFile.cpp.
| MachO::data_in_code_entry MachOObjectFile::getDice | ( | DataRefImpl | Rel | ) | const |
Definition at line 3392 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 3504 of file MachOObjectFile.cpp.
References llvm::MachO::dyld_info_command::bind_off, llvm::MachO::dyld_info_command::bind_size, getPtr(), llvm::makeArrayRef(), and None.
| ArrayRef< uint8_t > MachOObjectFile::getDyldInfoExportsTrie | ( | ) | const |
Definition at line 3537 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 3526 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 3298 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| ArrayRef< uint8_t > MachOObjectFile::getDyldInfoRebaseOpcodes | ( | ) | const |
Definition at line 3493 of file MachOObjectFile.cpp.
References getPtr(), llvm::makeArrayRef(), 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 3515 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 3293 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::dylinker_command MachOObjectFile::getDylinkerCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3303 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::dysymtab_command MachOObjectFile::getDysymtabLoadCommand | ( | ) | const |
Definition at line 3435 of file MachOObjectFile.cpp.
References llvm::MachO::dysymtab_command::cmd.
Referenced by llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection().
| MachO::encryption_info_command MachOObjectFile::getEncryptionInfoCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3328 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::encryption_info_command_64 MachOObjectFile::getEncryptionInfoCommand64 | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3333 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::entry_point_command MachOObjectFile::getEntryPointCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3323 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
inlineoverridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 268 of file Object/MachO.h.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2274 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 3397 of file MachOObjectFile.cpp.
References Header.
Referenced by checkSymbolTable(), getRelocationOffset(), and isRelocatableObject().
| const MachO::mach_header_64 & MachOObjectFile::getHeader64 | ( | ) | const |
Definition at line 3401 of file MachOObjectFile.cpp.
References assert(), Header64, and is64Bit().
Referenced by checkSymbolTable().
|
static |
Definition at line 2434 of file MachOObjectFile.cpp.
References llvm::sys::getDefaultTargetTriple().
| std::error_code MachOObjectFile::getIndirectName | ( | DataRefImpl | Symb, |
| StringRef & | Res | ||
| ) | const |
Definition at line 1606 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 3406 of file MachOObjectFile.cpp.
References getPtr(), llvm::MachO::dysymtab_command::indirectsymoff, and Offset.
Referenced by llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection().
| std::error_code MachOObjectFile::getLibraryShortNameByIndex | ( | unsigned | Index, |
| StringRef & | Res | ||
| ) | const |
Definition at line 2173 of file MachOObjectFile.cpp.
References llvm::MachO::dylib_command::cmdsize, D, llvm::MachO::dylib_command::dylib, llvm::StringRef::empty(), guessLibraryShortName(), i, 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 3268 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::linker_option_command MachOObjectFile::getLinkerOptionLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3283 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::linkedit_data_command MachOObjectFile::getLinkOptHintsLoadCommand | ( | ) | const |
Definition at line 3479 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::cmd.
| uint64_t MachOObjectFile::getNValue | ( | DataRefImpl | Sym | ) | const |
Definition at line 1595 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 3169 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 3162 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 3373 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::b, llvm::object::DataRefImpl::d, getPtr(), getSection(), getSection64(), is64Bit(), Offset, 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 2021 of file MachOObjectFile.cpp.
References getAnyRelocationLength(), and getRelocation().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1874 of file MachOObjectFile.cpp.
References assert(), getAnyRelocationAddress(), getHeader(), getRelocation(), and llvm::MachO::MH_OBJECT.
| section_iterator MachOObjectFile::getRelocationRelocatedSection | ( | relocation_iterator | Rel | ) | const |
Definition at line 2205 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 1903 of file MachOObjectFile.cpp.
References getAnyRelocationSection(), and getRelocation().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1882 of file MachOObjectFile.cpp.
References getPlainRelocationExternal(), getPlainRelocationSymbolNum(), getPtr(), getRelocation(), getSymtabLoadCommand(), is64Bit(), isRelocationScattered(), Offset, llvm::object::DataRefImpl::p, symbol_end(), llvm::object::ObjectFile::SymbolRef, and llvm::MachO::symtab_command::symoff.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1907 of file MachOObjectFile.cpp.
References getAnyRelocationType(), and getRelocation().
Referenced by getRelocationTypeName().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1912 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 3358 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::routines_command_64 MachOObjectFile::getRoutinesCommand64 | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3363 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::rpath_command MachOObjectFile::getRpathCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3313 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| bool MachOObjectFile::getScatteredRelocationScattered | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 3176 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 3186 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 3181 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 1737 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 1791 of file MachOObjectFile.cpp.
References llvm::MachO::section::align, llvm::MachO::section_64::align, getSection(), getSection64(), and is64Bit().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1772 of file MachOObjectFile.cpp.
References llvm::object::Binary::getData(), getSection(), getSection64(), is64Bit(), Offset, 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 3133 of file MachOObjectFile.cpp.
References llvm::ArrayRef< T >::data(), getSectionRawFinalSegmentName(), and parseSegmentOrSectionName().
Referenced by isSectionBitcode().
| unsigned MachOObjectFile::getSectionID | ( | SectionRef | Sec | ) | const |
Definition at line 1829 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 1730 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 3147 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, assert(), 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 3139 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, assert(), llvm::object::DataRefImpl::d, llvm::makeArrayRef(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by getSectionName().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1743 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 1589 of file MachOObjectFile.cpp.
References fuzzer::Flags, llvm::object::SectionRef::getRawDataRefImpl(), getSectionFlags(), and llvm::MachO::SECTION_TYPE.
| MachO::segment_command_64 MachOObjectFile::getSegment64LoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3278 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::segment_command MachOObjectFile::getSegmentLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3273 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::source_version_command MachOObjectFile::getSourceVersionCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3318 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| StringRef MachOObjectFile::getStringTableData | ( | ) | const |
Definition at line 3556 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 3353 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::sub_framework_command MachOObjectFile::getSubFrameworkCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3338 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::sub_library_command MachOObjectFile::getSubLibraryCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3348 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::sub_umbrella_command MachOObjectFile::getSubUmbrellaCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3343 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::nlist_64 MachOObjectFile::getSymbol64TableEntry | ( | DataRefImpl | DRI | ) | const |
Definition at line 3262 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by checkSymbolTable(), and getNValue().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1624 of file MachOObjectFile.cpp.
References llvm::object::ObjectFile::getSymbolValue().
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 1628 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 2235 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 1665 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 2247 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 1578 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 1705 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 1720 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 3256 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by checkSymbolTable(), and getNValue().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1642 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 3420 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 3368 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| ArrayRef< uint8_t > MachOObjectFile::getUuid | ( | ) | const |
Definition at line 3548 of file MachOObjectFile.cpp.
References llvm::makeArrayRef(), and None.
| MachO::uuid_command MachOObjectFile::getUuidCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3308 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
| MachO::version_min_command MachOObjectFile::getVersionMinLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 3288 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
inlinestatic |
Definition at line 430 of file Object/MachO.h.
References llvm::MachO::version_min_command::sdk, and llvm::MachO::version_min_command::version.
|
inlinestatic |
Definition at line 436 of file Object/MachO.h.
References llvm::MachO::version_min_command::sdk, and llvm::MachO::version_min_command::version.
|
inlinestatic |
Definition at line 442 of file Object/MachO.h.
References llvm::MachO::version_min_command::sdk, and llvm::MachO::version_min_command::version.
|
static |
Definition at line 2054 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 423 of file Object/MachO.h.
| bool MachOObjectFile::is64Bit | ( | ) | const |
Definition at line 3561 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(), getSectionContents(), getSectionSize(), getSymbolByIndex(), getSymbolIndex(), lazyBindTable(), moveSymbolNext(), llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection(), symbol_end(), and weakBindTable().
|
overridevirtual |
True if this is a relocatable object (.o/.obj).
Implements llvm::object::ObjectFile.
Definition at line 3578 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 3155 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 1838 of file MachOObjectFile.cpp.
References getSectionFinalSegmentName(), and getSectionName().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1821 of file MachOObjectFile.cpp.
References fuzzer::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 1804 of file MachOObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1813 of file MachOObjectFile.cpp.
References fuzzer::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 1808 of file MachOObjectFile.cpp.
References fuzzer::Flags, getSectionFlags(), and llvm::MachO::S_ATTR_PURE_INSTRUCTIONS.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1833 of file MachOObjectFile.cpp.
Definition at line 2438 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 3107 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 3128 of file MachOObjectFile.cpp.
References begin_load_commands(), end_load_commands(), and llvm::make_range().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1870 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::b, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1726 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1571 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 3566 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 2837 of file MachOObjectFile.cpp.
References llvm::make_range().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2259 of file MachOObjectFile.cpp.
References llvm::object::ObjectFile::SectionRef.
Referenced by llvm::RuntimeDyldMachO::getSectionByAddress().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2264 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 2211 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 2220 of file MachOObjectFile.cpp.
References getPtr(), getSymtabLoadCommand(), is64Bit(), llvm::MachO::symtab_command::nsyms, Offset, llvm::object::DataRefImpl::p, llvm::object::ObjectFile::SymbolRef, and llvm::MachO::symtab_command::symoff.
Referenced by getRelocationSymbol().
| iterator_range< bind_iterator > MachOObjectFile::weakBindTable | ( | ) | const |
For use iterating over all lazy bind table entries.
Definition at line 3112 of file MachOObjectFile.cpp.
References bindTable(), getDyldInfoWeakBindOpcodes(), is64Bit(), and llvm::object::MachOBindEntry::Weak.
| MachO::mach_header llvm::object::MachOObjectFile::Header |
Definition at line 457 of file Object/MachO.h.
Referenced by getHeader().
| MachO::mach_header_64 llvm::object::MachOObjectFile::Header64 |
Definition at line 456 of file Object/MachO.h.
Referenced by getHeader64().
1.8.6