LLVM API Documentation
#include <MachO.h>
Classes | |
struct | LoadCommandInfo |
Static Public Member Functions | |
static Triple::ArchType | getArch (uint32_t CPUType) |
static bool | classof (const Binary *v) |
![]() | |
static ObjectFile * | createObjectFile (StringRef ObjectPath) |
Create ObjectFile from path. More... | |
static ObjectFile * | createObjectFile (MemoryBuffer *Object) |
static bool | classof (const Binary *v) |
static ObjectFile * | createCOFFObjectFile (MemoryBuffer *Object) |
static ObjectFile * | createELFObjectFile (MemoryBuffer *Object) |
static ObjectFile * | createMachOObjectFile (MemoryBuffer *Object) |
Additional Inherited Members | |
![]() | |
enum | { ID_Archive, ID_MachOUniversalBinary, ID_StartObjects, ID_COFF, ID_ELF32L, ID_ELF32B, ID_ELF64L, ID_ELF64B, ID_MachO32L, ID_MachO32B, ID_MachO64L, ID_MachO64B, ID_EndObjects } |
![]() | |
ObjectFile (unsigned int Type, MemoryBuffer *source) | |
const uint8_t * | base () const |
virtual section_iterator | getRelocatedSection (DataRefImpl Sec) const |
![]() | |
Binary (unsigned int Type, MemoryBuffer *Source) | |
![]() | |
static unsigned int | getELFType (bool isLE, bool is64Bits) |
static unsigned int | getMachOType (bool isLE, bool is64Bits) |
![]() | |
MemoryBuffer * | Data |
Definition at line 52 of file Object/MachO.h.
llvm::object::MachOObjectFile::MachOObjectFile | ( | MemoryBuffer * | Object, |
bool | IsLittleEndian, | ||
bool | Is64Bits, | ||
error_code & | ec | ||
) |
Definition at line 422 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::C, llvm::MachO::load_command::cmd, getFirstLoadCommandInfo(), getHeader(), getNextLoadCommandInfo(), llvm::object::getSectionPtr(), llvm::object::getSegmentLoadCommandNumSections(), I, is64Bit(), llvm::SPII::Load, llvm::MachO::mach_header::ncmds, llvm::object::MachOObjectFile::LoadCommandInfo::Ptr, and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
dice_iterator llvm::object::MachOObjectFile::begin_dices | ( | ) | const |
Definition at line 1320 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::dataoff, getDataInCodeLoadCommand(), llvm::object::getPtr(), and llvm::object::DataRefImpl::p.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1215 of file MachOObjectFile.cpp.
References llvm::report_fatal_error().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1236 of file MachOObjectFile.cpp.
References llvm::report_fatal_error().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1225 of file MachOObjectFile.cpp.
References llvm::object::ObjectFile::SectionRef.
Referenced by llvm::MCMachOObjectDisassembler::MCMachOObjectDisassembler(), and llvm::object::printRelocationTargetName().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1190 of file MachOObjectFile.cpp.
References llvm::object::getPtr(), getSymtabLoadCommand(), llvm::object::DataRefImpl::p, llvm::object::ObjectFile::SymbolRef, and llvm::MachO::symtab_command::symoff.
Referenced by getSymbolSize(), and llvm::object::printRelocationTargetName().
Definition at line 202 of file Object/MachO.h.
References llvm::object::Binary::isMachO().
dice_iterator llvm::object::MachOObjectFile::end_dices | ( | ) | const |
Definition at line 1330 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::dataoff, llvm::MachO::linkedit_data_command::datasize, getDataInCodeLoadCommand(), llvm::object::getPtr(), and llvm::object::DataRefImpl::p.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1220 of file MachOObjectFile.cpp.
References llvm::report_fatal_error().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1241 of file MachOObjectFile.cpp.
References llvm::report_fatal_error().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1230 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 getRelocationSection(), getSymbolSection(), llvm::MCMachOObjectDisassembler::MCMachOObjectDisassembler(), and llvm::object::printRelocationTargetName().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1200 of file MachOObjectFile.cpp.
References llvm::object::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(), getSymbolSize(), and llvm::object::printRelocationTargetName().
unsigned llvm::object::MachOObjectFile::getAnyRelocationAddress | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1393 of file MachOObjectFile.cpp.
References llvm::object::getPlainRelocationAddress(), llvm::object::getScatteredRelocationAddress(), and isRelocationScattered().
Referenced by getRelocationOffset().
unsigned llvm::object::MachOObjectFile::getAnyRelocationLength | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1407 of file MachOObjectFile.cpp.
References llvm::object::getPlainRelocationLength(), llvm::object::getScatteredRelocationLength(), and isRelocationScattered().
Referenced by getRelocationValueString(), and llvm::RuntimeDyldMachO::processRelocationRef().
unsigned llvm::object::MachOObjectFile::getAnyRelocationPCRel | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1400 of file MachOObjectFile.cpp.
References llvm::object::getPlainRelocationPCRel(), llvm::object::getScatteredRelocationPCRel(), and isRelocationScattered().
Referenced by getRelocationValueString(), and llvm::RuntimeDyldMachO::processRelocationRef().
unsigned llvm::object::MachOObjectFile::getAnyRelocationType | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1415 of file MachOObjectFile.cpp.
References llvm::object::getPlainRelocationType(), llvm::object::getScatteredRelocationType(), and isRelocationScattered().
Referenced by getRelocationType(), getRelocationValueString(), and llvm::RuntimeDyldMachO::processRelocationRef().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1299 of file MachOObjectFile.cpp.
References llvm::object::getCPUType().
Referenced by llvm::object::MachOUniversalBinary::ObjectForArch::getAsObjectFile(), getRelocationHidden(), getRelocationTypeName(), and getRelocationValueString().
|
static |
Definition at line 1282 of file MachOObjectFile.cpp.
References llvm::Triple::arm, llvm::MachO::CPU_TYPE_ARM, 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.
|
virtual |
The number of bytes used to represent an address in this object file format.
Implements llvm::object::ObjectFile.
Definition at line 1246 of file MachOObjectFile.cpp.
References is64Bit().
MachO::linkedit_data_command llvm::object::MachOObjectFile::getDataInCodeLoadCommand | ( | ) | const |
Definition at line 1547 of file MachOObjectFile.cpp.
References llvm::MachO::linkedit_data_command::cmd.
Referenced by begin_dices(), and end_dices().
MachO::data_in_code_entry llvm::object::MachOObjectFile::getDataInCodeTableEntry | ( | uint32_t | DataOffset, |
unsigned | Index | ||
) | const |
Definition at line 1532 of file MachOObjectFile.cpp.
References llvm::object::getPtr().
MachO::data_in_code_entry llvm::object::MachOObjectFile::getDice | ( | DataRefImpl | Rel | ) | const |
Definition at line 1511 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().
MachO::dysymtab_command llvm::object::MachOObjectFile::getDysymtabLoadCommand | ( | ) | const |
Definition at line 1542 of file MachOObjectFile.cpp.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1250 of file MachOObjectFile.cpp.
References llvm::MachO::CPU_TYPE_ARM, llvm::MachO::CPU_TYPE_I386, llvm::MachO::CPU_TYPE_POWERPC, llvm::MachO::CPU_TYPE_POWERPC64, llvm::MachO::CPU_TYPE_X86_64, llvm::object::getCPUType(), and is64Bit().
MachOObjectFile::LoadCommandInfo llvm::object::MachOObjectFile::getFirstLoadCommandInfo | ( | ) | const |
Definition at line 1434 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::C, llvm::object::getPtr(), llvm::COFF::HeaderSize, is64Bit(), llvm::SPII::Load, and llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
Referenced by llvm::MCMachOObjectDisassembler::getEntrypoint(), and MachOObjectFile().
MachO::mach_header llvm::object::MachOObjectFile::getHeader | ( | ) | const |
Definition at line 1516 of file MachOObjectFile.cpp.
References llvm::object::getPtr().
Referenced by llvm::object::getCPUType(), llvm::MCMachOObjectDisassembler::getEntrypoint(), and MachOObjectFile().
MachO::mach_header_64 llvm::object::MachOObjectFile::getHeader64 | ( | ) | const |
Definition at line 1520 of file MachOObjectFile.cpp.
References llvm::object::getPtr().
uint32_t llvm::object::MachOObjectFile::getIndirectSymbolTableEntry | ( | const MachO::dysymtab_command & | DLC, |
unsigned | Index | ||
) | const |
Definition at line 1524 of file MachOObjectFile.cpp.
References llvm::object::getPtr(), and llvm::MachO::dysymtab_command::indirectsymoff.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1180 of file MachOObjectFile.cpp.
References llvm::report_fatal_error().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 1185 of file MachOObjectFile.cpp.
References llvm::report_fatal_error().
MachO::linkedit_data_command llvm::object::MachOObjectFile::getLinkeditDataLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 1485 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
MachO::linker_options_command llvm::object::MachOObjectFile::getLinkerOptionsLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 1500 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
|
virtual |
For shared objects, returns the name which this object should be loaded from at runtime. This corresponds to DT_SONAME on ELF and LC_ID_DYLIB (install name) on MachO.
Implements llvm::object::ObjectFile.
Definition at line 1303 of file MachOObjectFile.cpp.
References llvm::report_fatal_error().
MachOObjectFile::LoadCommandInfo llvm::object::MachOObjectFile::getNextLoadCommandInfo | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 1445 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::C, llvm::MachO::load_command::cmdsize, and llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
Referenced by llvm::MCMachOObjectDisassembler::getEntrypoint(), and MachOObjectFile().
bool llvm::object::MachOObjectFile::getPlainRelocationExternal | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1376 of file MachOObjectFile.cpp.
References llvm::object::Binary::isLittleEndian(), and llvm::MachO::any_relocation_info::r_word1.
Referenced by getRelocationSection(), getRelocationSymbol(), llvm::object::printRelocationTargetName(), and llvm::RuntimeDyldMachO::processRelocationRef().
unsigned llvm::object::MachOObjectFile::getPlainRelocationSymbolNum | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1369 of file MachOObjectFile.cpp.
References llvm::object::Binary::isLittleEndian(), and llvm::MachO::any_relocation_info::r_word1.
Referenced by getRelocationSection(), getRelocationSymbol(), and llvm::object::printRelocationTargetName().
MachO::any_relocation_info llvm::object::MachOObjectFile::getRelocation | ( | DataRefImpl | Rel | ) | const |
Definition at line 1505 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by getRelocationOffset(), getRelocationSymbol(), getRelocationType(), getRelocationValueString(), and llvm::RuntimeDyldMachO::processRelocationRef().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 847 of file MachOObjectFile.cpp.
References llvm::report_fatal_error().
|
virtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 1153 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::Triple::arm, llvm::object::DataRefImpl::d, llvm::MachO::GENERIC_RELOC_PAIR, getArch(), getRelocationType(), llvm::Triple::ppc, llvm::object::object_error::success, Type, llvm::Triple::x86, llvm::Triple::x86_64, llvm::MachO::X86_64_RELOC_SUBTRACTOR, and llvm::MachO::X86_64_RELOC_UNSIGNED.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 837 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, P, llvm::object::ObjectFile::RelocationRef, and llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 851 of file MachOObjectFile.cpp.
References getAnyRelocationAddress(), getRelocation(), and llvm::object::object_error::success.
SectionRef llvm::object::MachOObjectFile::getRelocationSection | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1423 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, end_sections(), getPlainRelocationExternal(), getPlainRelocationSymbolNum(), isRelocationScattered(), and llvm::object::ObjectFile::SectionRef.
Referenced by llvm::RuntimeDyldMachO::processRelocationRef().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 859 of file MachOObjectFile.cpp.
References end_symbols(), getPlainRelocationExternal(), getPlainRelocationSymbolNum(), llvm::object::getPtr(), getRelocation(), getSymtabLoadCommand(), is64Bit(), llvm::object::DataRefImpl::p, llvm::object::ObjectFile::SymbolRef, and llvm::MachO::symtab_command::symoff.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 876 of file MachOObjectFile.cpp.
References getAnyRelocationType(), getRelocation(), and llvm::object::object_error::success.
Referenced by getRelocationHidden(), and getRelocationTypeName().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 884 of file MachOObjectFile.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::Triple::arm, llvm::StringRef::begin(), llvm::StringRef::end(), getArch(), getRelocationType(), llvm::Triple::ppc, llvm::object::object_error::success, llvm::Triple::UnknownArch, llvm::Triple::x86, and llvm::Triple::x86_64.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 977 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::SmallVectorImpl< T >::append(), llvm::Triple::arm, llvm::MachO::ARM_RELOC_HALF, llvm::MachO::ARM_RELOC_HALF_SECTDIFF, llvm::MachO::ARM_RELOC_PAIR, llvm::object::DataRefImpl::d, llvm::raw_ostream::flush(), llvm::MachO::GENERIC_RELOC_LOCAL_SECTDIFF, llvm::MachO::GENERIC_RELOC_PAIR, llvm::MachO::GENERIC_RELOC_SECTDIFF, llvm::MachO::GENERIC_RELOC_TLV, getAnyRelocationLength(), getAnyRelocationPCRel(), getAnyRelocationType(), getArch(), getRelocation(), llvm::Triple::ppc, llvm::object::printRelocationTargetName(), llvm::report_fatal_error(), llvm::object::object_error::success, llvm::Triple::x86, llvm::Triple::x86_64, llvm::MachO::X86_64_RELOC_GOT, llvm::MachO::X86_64_RELOC_GOT_LOAD, llvm::MachO::X86_64_RELOC_SIGNED_1, llvm::MachO::X86_64_RELOC_SIGNED_2, llvm::MachO::X86_64_RELOC_SIGNED_4, llvm::MachO::X86_64_RELOC_SUBTRACTOR, llvm::MachO::X86_64_RELOC_TLV, and llvm::MachO::X86_64_RELOC_UNSIGNED.
bool llvm::object::MachOObjectFile::getScatteredRelocationScattered | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1383 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word0.
uint32_t llvm::object::MachOObjectFile::getScatteredRelocationValue | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1388 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word1.
MachO::section llvm::object::MachOObjectFile::getSection | ( | DataRefImpl | DRI | ) | const |
Definition at line 1452 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
Referenced by getSectionAddress(), getSectionAlignment(), getSectionContents(), llvm::object::getSectionFlags(), getSectionSize(), getSymbolFileOffset(), section_rel_begin(), and section_rel_end().
MachO::section llvm::object::MachOObjectFile::getSection | ( | const LoadCommandInfo & | L, |
unsigned | Index | ||
) | const |
Definition at line 1460 of file MachOObjectFile.cpp.
References llvm::object::getSectionPtr().
MachO::section_64 llvm::object::MachOObjectFile::getSection64 | ( | DataRefImpl | DRI | ) | const |
Definition at line 1456 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
Referenced by getSectionAddress(), getSectionAlignment(), getSectionContents(), llvm::object::getSectionFlags(), getSectionSize(), getSymbolFileOffset(), section_rel_begin(), and section_rel_end().
MachO::section_64 llvm::object::MachOObjectFile::getSection64 | ( | const LoadCommandInfo & | L, |
unsigned | Index | ||
) | const |
Definition at line 1466 of file MachOObjectFile.cpp.
References llvm::object::getSectionPtr().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 666 of file MachOObjectFile.cpp.
References llvm::MachO::section::addr, llvm::MachO::section_64::addr, getSection(), getSection64(), is64Bit(), and llvm::object::object_error::success.
Referenced by getSymbolSize(), and sectionContainsSymbol().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 710 of file MachOObjectFile.cpp.
References Align(), llvm::MachO::section::align, llvm::MachO::section_64::align, getSection(), getSection64(), is64Bit(), and llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 691 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, llvm::StringRef::substr(), and llvm::object::object_error::success.
StringRef llvm::object::MachOObjectFile::getSectionFinalSegmentName | ( | DataRefImpl | Sec | ) | const |
Definition at line 1342 of file MachOObjectFile.cpp.
References llvm::ArrayRef< T >::data(), getSectionRawFinalSegmentName(), and llvm::object::parseSegmentOrSectionName().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 659 of file MachOObjectFile.cpp.
References llvm::ArrayRef< T >::data(), getSectionRawName(), llvm::object::parseSegmentOrSectionName(), and llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 651 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, llvm::object::ObjectFile::SectionRef, and llvm::object::object_error::success.
ArrayRef< char > llvm::object::MachOObjectFile::getSectionRawFinalSegmentName | ( | DataRefImpl | Sec | ) | const |
Definition at line 1355 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and llvm::object::section_base::segname.
Referenced by getSectionFinalSegmentName().
ArrayRef< char > llvm::object::MachOObjectFile::getSectionRawName | ( | DataRefImpl | Sec | ) | const |
Definition at line 1348 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and llvm::object::section_base::sectname.
Referenced by getSectionName().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 678 of file MachOObjectFile.cpp.
References getSection(), getSection64(), is64Bit(), llvm::MachO::section::size, llvm::MachO::section_64::size, and llvm::object::object_error::success.
Referenced by getSymbolSize(), and sectionContainsSymbol().
MachO::segment_command_64 llvm::object::MachOObjectFile::getSegment64LoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 1495 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
Referenced by llvm::object::getSegmentLoadCommandNumSections().
MachO::segment_command llvm::object::MachOObjectFile::getSegmentLoadCommand | ( | const LoadCommandInfo & | L | ) | const |
Definition at line 1490 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::LoadCommandInfo::Ptr.
Referenced by llvm::object::getSegmentLoadCommandNumSections().
StringRef llvm::object::MachOObjectFile::getStringTableData | ( | ) | const |
Definition at line 1560 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 getSymbolName().
MachO::nlist_64 llvm::object::MachOObjectFile::getSymbol64TableEntry | ( | DataRefImpl | DRI | ) | const |
Definition at line 1479 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by getSymbolAddress().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 476 of file MachOObjectFile.cpp.
References getSymbol64TableEntry(), getSymbolTableEntry(), is64Bit(), llvm::MachO::nlist::n_value, llvm::MachO::nlist_64::n_value, and llvm::object::object_error::success.
Referenced by getSymbolFileOffset(), getSymbolFlags(), getSymbolSize(), and sectionContainsSymbol().
|
virtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 511 of file MachOObjectFile.cpp.
References llvm::MachO::GET_COMM_ALIGN(), getSymbolFlags(), llvm::object::getSymbolTableEntryBase(), llvm::object::nlist_base::n_desc, and llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 489 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::MachO::section::addr, llvm::MachO::section_64::addr, llvm::object::DataRefImpl::d, getSection(), getSection64(), getSymbolAddress(), llvm::object::getSymbolTableEntryBase(), is64Bit(), llvm::object::nlist_base::n_sect, llvm::MachO::section::offset, llvm::MachO::section_64::offset, and llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 594 of file MachOObjectFile.cpp.
References getSymbolAddress(), llvm::object::getSymbolTableEntryBase(), llvm::MachO::N_ABS, llvm::object::nlist_base::n_desc, llvm::MachO::N_EXT, llvm::MachO::N_STAB, llvm::object::nlist_base::n_type, llvm::MachO::N_TYPE, llvm::MachO::N_UNDF, llvm::MachO::N_WEAK_DEF, llvm::MachO::N_WEAK_REF, and llvm::object::object_error::success.
Referenced by getSymbolAlignment(), and getSymbolSize().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 467 of file MachOObjectFile.cpp.
References llvm::StringRef::data(), getStringTableData(), llvm::object::getSymbolTableEntryBase(), llvm::object::nlist_base::n_strx, and llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 457 of file MachOObjectFile.cpp.
References is64Bit(), llvm::object::DataRefImpl::p, llvm::object::object_error::success, and llvm::object::ObjectFile::SymbolRef.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 630 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, end_sections(), llvm::object::getSymbolTableEntryBase(), llvm::object::nlist_base::n_sect, llvm::object::ObjectFile::SectionRef, and llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 524 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, begin_symbols(), llvm::object::DataRefImpl::d, end_symbols(), getSectionAddress(), getSectionSize(), getSymbolAddress(), getSymbolFlags(), llvm::object::getSymbolTableEntryBase(), I, llvm::object::nlist_base::n_sect, llvm::object::object_error::success, and llvm::object::UnknownAddressOrSize.
MachO::nlist llvm::object::MachOObjectFile::getSymbolTableEntry | ( | DataRefImpl | DRI | ) | const |
Definition at line 1473 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by getSymbolAddress().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 570 of file MachOObjectFile.cpp.
References llvm::object::getSymbolTableEntryBase(), llvm::MachO::N_SECT, llvm::MachO::N_STAB, llvm::object::nlist_base::n_type, llvm::MachO::N_TYPE, llvm::MachO::N_UNDF, llvm::object::SymbolRef::ST_Debug, llvm::object::SymbolRef::ST_Function, llvm::object::SymbolRef::ST_Other, llvm::object::SymbolRef::ST_Unknown, and llvm::object::object_error::success.
Referenced by sectionContainsSymbol().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 646 of file MachOObjectFile.cpp.
References llvm::report_fatal_error().
MachO::symtab_command llvm::object::MachOObjectFile::getSymtabLoadCommand | ( | ) | const |
Definition at line 1538 of file MachOObjectFile.cpp.
Referenced by begin_symbols(), end_symbols(), getRelocationSymbol(), and getStringTableData().
bool llvm::object::MachOObjectFile::is64Bit | ( | ) | const |
Definition at line 1565 of file MachOObjectFile.cpp.
References llvm::object::Binary::getMachOType(), and llvm::object::Binary::getType().
Referenced by end_symbols(), getBytesInAddress(), getFileFormatName(), getFirstLoadCommandInfo(), getRelocationSymbol(), getSectionAddress(), getSectionAlignment(), getSectionContents(), llvm::object::getSectionFlags(), llvm::object::getSectionPtr(), getSectionSize(), llvm::object::getSegmentLoadCommandNumSections(), llvm::MCMachOObjectDisassembler::getStaticExitFunctions(), llvm::MCMachOObjectDisassembler::getStaticInitFunctions(), getSymbolAddress(), getSymbolFileOffset(), getSymbolNext(), MachOObjectFile(), section_rel_begin(), and section_rel_end().
bool llvm::object::MachOObjectFile::isRelocationScattered | ( | const MachO::any_relocation_info & | RE | ) | const |
Definition at line 1362 of file MachOObjectFile.cpp.
References llvm::MachO::CPU_TYPE_X86_64, llvm::object::getCPUType(), and llvm::object::getPlainRelocationAddress().
Referenced by getAnyRelocationAddress(), getAnyRelocationLength(), getAnyRelocationPCRel(), getAnyRelocationType(), getRelocationSection(), llvm::object::printRelocationTargetName(), and llvm::RuntimeDyldMachO::processRelocationRef().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 737 of file MachOObjectFile.cpp.
References llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 731 of file MachOObjectFile.cpp.
References llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 767 of file MachOObjectFile.cpp.
References llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 744 of file MachOObjectFile.cpp.
References llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 725 of file MachOObjectFile.cpp.
References llvm::object::getSectionFlags(), and llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 751 of file MachOObjectFile.cpp.
References llvm::object::object_error::success.
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 759 of file MachOObjectFile.cpp.
References llvm::object::getSectionFlags(), llvm::MachO::S_GB_ZEROFILL, llvm::MachO::S_ZEROFILL, and llvm::object::object_error::success.
void llvm::object::MachOObjectFile::ReadULEB128s | ( | uint64_t | Index, |
SmallVectorImpl< uint64_t > & | Out | ||
) | const |
Definition at line 1570 of file MachOObjectFile.cpp.
References llvm::object::Binary::getData(), llvm::DataExtractor::getULEB128(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 800 of file MachOObjectFile.cpp.
References llvm::object::getPtr(), getSection(), getSection64(), is64Bit(), llvm::object::DataRefImpl::p, llvm::object::ObjectFile::RelocationRef, llvm::MachO::section::reloff, llvm::MachO::section_64::reloff, and llvm::AArch64ISD::Ret.
Referenced by section_rel_begin().
relocation_iterator llvm::object::MachOObjectFile::section_rel_begin | ( | unsigned | Index | ) | const |
Definition at line 1308 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and section_rel_begin().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 816 of file MachOObjectFile.cpp.
References llvm::object::getPtr(), getSection(), getSection64(), is64Bit(), llvm::MachO::section::nreloc, llvm::MachO::section_64::nreloc, llvm::object::DataRefImpl::p, P, llvm::object::ObjectFile::RelocationRef, llvm::MachO::section::reloff, llvm::MachO::section_64::reloff, and llvm::AArch64ISD::Ret.
Referenced by section_rel_end().
relocation_iterator llvm::object::MachOObjectFile::section_rel_end | ( | unsigned | Index | ) | const |
Definition at line 1314 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and section_rel_end().
|
virtual |
Implements llvm::object::ObjectFile.
Definition at line 779 of file MachOObjectFile.cpp.
References getSectionAddress(), getSectionSize(), getSymbolAddress(), getSymbolType(), llvm::A64DB::ST, llvm::object::SymbolRef::ST_Unknown, and llvm::object::object_error::success.