LLVM API Documentation
#include <RuntimeDyldELF.h>
Public Member Functions | |
RuntimeDyldELF (RTDyldMemoryManager *mm) | |
void | resolveRelocation (const RelocationEntry &RE, uint64_t Value) override |
A object file specific relocation resolver. | |
relocation_iterator | processRelocationRef (unsigned SectionID, relocation_iterator RelI, ObjectImage &Obj, ObjSectionToIDMap &ObjSectionToID, const SymbolTableMap &Symbols, StubMap &Stubs) override |
Parses one or more object file relocations (some object files use relocation pairs) and stores it to Relocations or SymbolRelocations (this depends on the object file type). | |
bool | isCompatibleFormat (const ObjectBuffer *Buffer) const override |
bool | isCompatibleFile (const object::ObjectFile *Buffer) const override |
void | registerEHFrames () override |
void | deregisterEHFrames () override |
void | finalizeLoad (ObjectImage &ObjImg, ObjSectionToIDMap &SectionMap) override |
virtual | ~RuntimeDyldELF () |
Static Public Member Functions | |
static std::unique_ptr < ObjectImage > | createObjectImage (std::unique_ptr< ObjectBuffer > InputBuffer) |
static ObjectImage * | createObjectImageFromFile (std::unique_ptr< object::ObjectFile > Obj) |
Definition at line 33 of file RuntimeDyldELF.h.
llvm::RuntimeDyldELF::RuntimeDyldELF | ( | RTDyldMemoryManager * | mm | ) | [inline] |
Definition at line 107 of file RuntimeDyldELF.h.
llvm::RuntimeDyldELF::~RuntimeDyldELF | ( | ) | [virtual] |
Definition at line 258 of file RuntimeDyldELF.cpp.
std::unique_ptr< ObjectImage > llvm::RuntimeDyldELF::createObjectImage | ( | std::unique_ptr< ObjectBuffer > | InputBuffer | ) | [static] |
Definition at line 218 of file RuntimeDyldELF.cpp.
References llvm::ELF::EI_CLASS, llvm::ELF::EI_DATA, llvm::ELF::EI_NIDENT, llvm::ELF::ELFCLASS32, llvm::ELF::ELFCLASS64, llvm::ELF::ELFDATA2LSB, llvm::ELF::ELFDATA2MSB, llvm_unreachable, and llvm::make_unique().
Referenced by llvm::RuntimeDyld::loadObject().
ObjectImage * llvm::RuntimeDyldELF::createObjectImageFromFile | ( | std::unique_ptr< object::ObjectFile > | Obj | ) | [static] |
Definition at line 184 of file RuntimeDyldELF.cpp.
References llvm_unreachable.
void llvm::RuntimeDyldELF::deregisterEHFrames | ( | ) | [override, virtual] |
Reimplemented from llvm::RuntimeDyldImpl.
Definition at line 170 of file RuntimeDyldELF.cpp.
void llvm::RuntimeDyldELF::finalizeLoad | ( | ObjectImage & | ObjImg, |
ObjSectionToIDMap & | SectionMap | ||
) | [override, virtual] |
Reimplemented from llvm::RuntimeDyldImpl.
Definition at line 1501 of file RuntimeDyldELF.cpp.
References llvm::object::SectionRef::getName(), llvm::LibFunc::memset, Name, and llvm::report_fatal_error().
bool llvm::RuntimeDyldELF::isCompatibleFile | ( | const object::ObjectFile * | Buffer | ) | const [override, virtual] |
Implements llvm::RuntimeDyldImpl.
Definition at line 1546 of file RuntimeDyldELF.cpp.
References llvm::object::Binary::isELF().
bool llvm::RuntimeDyldELF::isCompatibleFormat | ( | const ObjectBuffer * | Buffer | ) | const [override, virtual] |
Implements llvm::RuntimeDyldImpl.
Definition at line 1539 of file RuntimeDyldELF.cpp.
References llvm::ELF::ElfMagic, llvm::ObjectBuffer::getBufferSize(), llvm::ObjectBuffer::getBufferStart(), llvm::LibFunc::memcmp, and llvm::LibFunc::strlen.
relocation_iterator llvm::RuntimeDyldELF::processRelocationRef | ( | unsigned | SectionID, |
relocation_iterator | RelI, | ||
ObjectImage & | Obj, | ||
ObjSectionToIDMap & | ObjSectionToID, | ||
const SymbolTableMap & | Symbols, | ||
StubMap & | Stubs | ||
) | [override, virtual] |
Parses one or more object file relocations (some object files use relocation pairs) and stores it to Relocations or SymbolRelocations (this depends on the object file type).
Implements llvm::RuntimeDyldImpl.
Definition at line 938 of file RuntimeDyldELF.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_be, llvm::RelocationValueRef::Addend, llvm::SectionEntry::Address, llvm::Triple::arm, Check(), llvm::StringRef::data(), llvm::dbgs(), DEBUG, llvm::ELF::decodePPC64LocalEntryOffset(), llvm::ELF::EF_PPC64_ABI, llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::ObjectImage::end_sections(), llvm::ObjectImage::end_symbols(), llvm::StringMap< ValueTy, AllocatorTy >::find(), llvm::object::getELFRelocationAddend(), llvm::object::SymbolRef::getName(), llvm::ObjectImage::getObjectFile(), llvm::object::SymbolRef::getOther(), llvm::object::ObjectFile::getPlatformFlags(), llvm::object::SymbolRef::getSection(), llvm::object::SymbolRef::getType(), llvm_unreachable, llvm::Triple::mips, llvm::Triple::mipsel, llvm::RelocationValueRef::Offset, llvm::Triple::ppc64, llvm::Triple::ppc64le, llvm::ELF::R_390_64, llvm::ELF::R_390_GOTENT, llvm::ELF::R_390_PC32DBL, llvm::ELF::R_390_PLT32DBL, llvm::ELF::R_AARCH64_CALL26, llvm::ELF::R_AARCH64_JUMP26, llvm::ELF::R_AARCH64_MOVW_UABS_G0_NC, llvm::ELF::R_AARCH64_MOVW_UABS_G1_NC, llvm::ELF::R_AARCH64_MOVW_UABS_G2_NC, llvm::ELF::R_AARCH64_MOVW_UABS_G3, llvm::ELF::R_ARM_CALL, llvm::ELF::R_ARM_JUMP24, llvm::ELF::R_ARM_PC24, llvm::ELF::R_ARM_PRIVATE_0, llvm::ELF::R_MIPS_26, llvm::ELF::R_MIPS_UNUSED1, llvm::ELF::R_MIPS_UNUSED2, llvm::ELF::R_PPC64_ADDR16, llvm::ELF::R_PPC64_ADDR16_DS, llvm::ELF::R_PPC64_ADDR16_HA, llvm::ELF::R_PPC64_ADDR16_HI, llvm::ELF::R_PPC64_ADDR16_HIGHER, llvm::ELF::R_PPC64_ADDR16_HIGHEST, llvm::ELF::R_PPC64_ADDR16_LO, llvm::ELF::R_PPC64_ADDR16_LO_DS, llvm::ELF::R_PPC64_ADDR64, llvm::ELF::R_PPC64_REL24, llvm::ELF::R_PPC64_TOC, llvm::ELF::R_PPC64_TOC16, llvm::ELF::R_PPC64_TOC16_DS, llvm::ELF::R_PPC64_TOC16_HA, llvm::ELF::R_PPC64_TOC16_HI, llvm::ELF::R_PPC64_TOC16_LO, llvm::ELF::R_PPC64_TOC16_LO_DS, llvm::ELF::R_X86_64_GOTPCREL, llvm::ELF::R_X86_64_PC32, llvm::ELF::R_X86_64_PLT32, llvm::StringMapEntry< ValueTy >::second, llvm::RelocationValueRef::SectionID, llvm::object::SymbolRef::ST_Data, llvm::object::SymbolRef::ST_Debug, llvm::object::SymbolRef::ST_Unknown, llvm::SectionEntry::StubOffset, llvm::ARMBuildAttrs::Symbol, llvm::RelocationValueRef::SymbolName, llvm::Triple::systemz, and llvm::Triple::x86_64.
void llvm::RuntimeDyldELF::registerEHFrames | ( | ) | [override, virtual] |
Reimplemented from llvm::RuntimeDyldImpl.
Definition at line 156 of file RuntimeDyldELF.cpp.
void llvm::RuntimeDyldELF::resolveRelocation | ( | const RelocationEntry & | RE, |
uint64_t | Value | ||
) | [override, virtual] |
A object file specific relocation resolver.
RE | The relocation to be resolved |
Value | Target symbol address to apply the relocation action |
Implements llvm::RuntimeDyldImpl.
Definition at line 891 of file RuntimeDyldELF.cpp.
References llvm::RelocationEntry::Addend, llvm::RelocationEntry::Offset, llvm::RelocationEntry::RelType, llvm::RelocationEntry::SectionID, and llvm::RelocationEntry::SymOffset.