LLVM API Documentation
#include <RuntimeDyldMachO.h>
Definition at line 28 of file RuntimeDyldMachO.h.
llvm::RuntimeDyldMachO::RuntimeDyldMachO | ( | RTDyldMemoryManager * | mm | ) | [inline, protected] |
Definition at line 53 of file RuntimeDyldMachO.h.
std::unique_ptr< RuntimeDyldMachO > llvm::RuntimeDyldMachO::create | ( | Triple::ArchType | Arch, |
RTDyldMemoryManager * | mm | ||
) | [static] |
Create a RuntimeDyldMachO instance for the given target architecture.
Definition at line 289 of file RuntimeDyldMachO.cpp.
References llvm::Triple::aarch64, llvm::Triple::arm, llvm_unreachable, llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by llvm::createRuntimeDyldMachO().
static std::unique_ptr<ObjectImage> llvm::RuntimeDyldMachO::createObjectImage | ( | std::unique_ptr< ObjectBuffer > | InputBuffer | ) | [inline, static] |
Create an ObjectImage from the given ObjectBuffer.
Definition at line 117 of file RuntimeDyldMachO.h.
Referenced by llvm::RuntimeDyld::loadObject().
static ObjectImage* llvm::RuntimeDyldMachO::createObjectImageFromFile | ( | std::unique_ptr< object::ObjectFile > | InputObject | ) | [inline, static] |
Create an ObjectImage from the given ObjectFile.
Definition at line 123 of file RuntimeDyldMachO.h.
void llvm::RuntimeDyldMachO::dumpRelocationToResolve | ( | const RelocationEntry & | RE, |
uint64_t | Value | ||
) | const [protected] |
Dump information about the relocation entry (RE) and resolved value.
Definition at line 97 of file RuntimeDyldMachO.cpp.
References llvm::RelocationEntry::Addend, llvm::SectionEntry::Address, llvm::dbgs(), llvm::format(), llvm::RelocationEntry::IsPCRel, llvm::SectionEntry::LoadAddress, llvm::RelocationEntry::Offset, llvm::RelocationEntry::RelType, llvm::ARMBuildAttrs::Section, llvm::RelocationEntry::SectionID, and llvm::RelocationEntry::Size.
Referenced by llvm::RuntimeDyldMachOX86_64::resolveRelocation(), llvm::RuntimeDyldMachOI386::resolveRelocation(), llvm::RuntimeDyldMachOARM::resolveRelocation(), and llvm::RuntimeDyldMachOAArch64::resolveRelocation().
RelocationEntry llvm::RuntimeDyldMachO::getRelocationEntry | ( | unsigned | SectionID, |
ObjectImage & | ObjImg, | ||
const relocation_iterator & | RI | ||
) | const [inline, protected] |
Given a relocation_iterator for a non-scattered relocation, construct a RelocationEntry and fill in the common fields. The 'Addend' field is *not* filled in, since immediate encodings are highly target/opcode specific. For targets/opcodes with simple, contiguous immediates (e.g. X86) the memcpyAddend method can be used to read the immediate.
Definition at line 64 of file RuntimeDyldMachO.h.
References llvm::object::MachOObjectFile::getAnyRelocationLength(), llvm::object::MachOObjectFile::getAnyRelocationPCRel(), llvm::object::MachOObjectFile::getAnyRelocationType(), llvm::ObjectImage::getObjectFile(), and llvm::object::MachOObjectFile::getRelocation().
Referenced by llvm::RuntimeDyldMachOI386::processRelocationRef(), llvm::RuntimeDyldMachOX86_64::processRelocationRef(), llvm::RuntimeDyldMachOARM::processRelocationRef(), and llvm::RuntimeDyldMachOAArch64::processRelocationRef().
RelocationValueRef llvm::RuntimeDyldMachO::getRelocationValueRef | ( | ObjectImage & | ObjImg, |
const relocation_iterator & | RI, | ||
const RelocationEntry & | RE, | ||
ObjSectionToIDMap & | ObjSectionToID, | ||
const SymbolTableMap & | Symbols | ||
) | [protected] |
Construct a RelocationValueRef representing the relocation target. For Symbols in known sections, this will return a RelocationValueRef representing a (SectionID, Offset) pair. For Symbols whose section is not known, this will return a (SymbolName, Offset) pair, where the Offset is taken from the instruction immediate (held in RE.Addend). In both cases the Addend field is *NOT* fixed up to be PC-relative. That should be done by the caller where appropriate by calling makePCRel on the RelocationValueRef.
Definition at line 37 of file RuntimeDyldMachO.cpp.
References llvm::RelocationEntry::Addend, llvm::StringRef::data(), llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringMap< ValueTy, AllocatorTy >::find(), llvm::object::SectionRef::getAddress(), llvm::object::SymbolRef::getName(), llvm::ObjectImage::getObjectFile(), llvm::object::MachOObjectFile::getPlainRelocationExternal(), llvm::object::MachOObjectFile::getRelocation(), llvm::object::MachOObjectFile::getRelocationSection(), llvm::object::SectionRef::isText(), llvm::RelocationValueRef::Offset, llvm::StringMapEntry< ValueTy >::second, llvm::RelocationValueRef::SectionID, llvm::ARMBuildAttrs::Symbol, and llvm::RelocationValueRef::SymbolName.
Referenced by llvm::RuntimeDyldMachOX86_64::processRelocationRef(), llvm::RuntimeDyldMachOI386::processRelocationRef(), llvm::RuntimeDyldMachOARM::processRelocationRef(), and llvm::RuntimeDyldMachOAArch64::processRelocationRef().
SectionEntry& llvm::RuntimeDyldMachO::getSection | ( | unsigned | SectionID | ) | [inline] |
Definition at line 131 of file RuntimeDyldMachO.h.
section_iterator llvm::RuntimeDyldMachO::getSectionByAddress | ( | const MachOObjectFile & | Obj, |
uint64_t | Addr | ||
) | [static, protected] |
Definition at line 112 of file RuntimeDyldMachO.cpp.
References llvm::object::MachOObjectFile::section_begin(), and llvm::object::MachOObjectFile::section_end().
bool llvm::RuntimeDyldMachO::isCompatibleFile | ( | const object::ObjectFile * | Obj | ) | const [override, virtual] |
Implements llvm::RuntimeDyldImpl.
Definition at line 185 of file RuntimeDyldMachO.cpp.
References llvm::object::Binary::isMachO().
bool llvm::RuntimeDyldMachO::isCompatibleFormat | ( | const ObjectBuffer * | Buffer | ) | const [override, virtual] |
Implements llvm::RuntimeDyldImpl.
Definition at line 170 of file RuntimeDyldMachO.cpp.
References llvm::ObjectBuffer::getBufferSize(), llvm::ObjectBuffer::getBufferStart(), and Magic.
void llvm::RuntimeDyldMachO::makeValueAddendPCRel | ( | RelocationValueRef & | Value, |
ObjectImage & | ObjImg, | ||
const relocation_iterator & | RI, | ||
unsigned | OffsetToNextPC | ||
) | [protected] |
Make the RelocationValueRef addend PC-relative.
Definition at line 80 of file RuntimeDyldMachO.cpp.
References llvm::object::MachOObjectFile::getAnyRelocationPCRel(), llvm::ObjectImage::getObjectFile(), llvm::object::MachOObjectFile::getRelocation(), and llvm::RelocationValueRef::Offset.
Referenced by llvm::RuntimeDyldMachOI386::processRelocationRef(), llvm::RuntimeDyldMachOX86_64::processRelocationRef(), llvm::RuntimeDyldMachOARM::processRelocationRef(), and llvm::RuntimeDyldMachOAArch64::processRelocationRef().
int64_t llvm::RuntimeDyldMachO::memcpyAddend | ( | const RelocationEntry & | RE | ) | const [protected] |
This convenience method uses memcpy to extract a contiguous addend (the addend size and offset are taken from the corresponding fields of the RE).
Definition at line 30 of file RuntimeDyldMachO.cpp.
References llvm::RelocationEntry::Offset, llvm::RelocationEntry::SectionID, and llvm::RelocationEntry::Size.
Referenced by llvm::RuntimeDyldMachOARM::decodeAddend(), llvm::RuntimeDyldMachOI386::processRelocationRef(), and llvm::RuntimeDyldMachOX86_64::processRelocationRef().
void llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection | ( | MachOObjectFile & | Obj, |
const SectionRef & | PTSection, | ||
unsigned | PTSectionID | ||
) | [protected] |
Definition at line 130 of file RuntimeDyldMachO.cpp.
References llvm::dbgs(), DEBUG, llvm::MachO::GENERIC_RELOC_VANILLA, llvm::object::MachOObjectFile::getDysymtabLoadCommand(), llvm::object::MachOObjectFile::getIndirectSymbolTableEntry(), llvm::object::SymbolRef::getName(), llvm::object::SectionRef::getRawDataRefImpl(), llvm::object::MachOObjectFile::getSection(), llvm::object::MachOObjectFile::getSymbolByIndex(), llvm::object::MachOObjectFile::is64Bit(), Name, llvm::MachO::section::reserved1, and llvm::MachO::section::size.
Referenced by llvm::RuntimeDyldMachOI386::finalizeSection(), and llvm::RuntimeDyldMachOARM::finalizeSection().
SmallVector<EHFrameRelatedSections, 2> llvm::RuntimeDyldMachO::UnregisteredEHFrameSections [protected] |
Definition at line 51 of file RuntimeDyldMachO.h.