LLVM API Documentation

Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
llvm::RuntimeDyldMachO Class Reference

#include <RuntimeDyldMachO.h>

Inheritance diagram for llvm::RuntimeDyldMachO:
Inheritance graph
[legend]
Collaboration diagram for llvm::RuntimeDyldMachO:
Collaboration graph
[legend]

List of all members.

Classes

struct  EHFrameRelatedSections
struct  SectionOffsetPair

Public Member Functions

SectionEntrygetSection (unsigned SectionID)
bool isCompatibleFormat (const ObjectBuffer *Buffer) const override
bool isCompatibleFile (const object::ObjectFile *Obj) const override

Static Public Member Functions

static std::unique_ptr
< ObjectImage
createObjectImage (std::unique_ptr< ObjectBuffer > InputBuffer)
 Create an ObjectImage from the given ObjectBuffer.
static ObjectImagecreateObjectImageFromFile (std::unique_ptr< object::ObjectFile > InputObject)
 Create an ObjectImage from the given ObjectFile.
static std::unique_ptr
< RuntimeDyldMachO
create (Triple::ArchType Arch, RTDyldMemoryManager *mm)
 Create a RuntimeDyldMachO instance for the given target architecture.

Protected Member Functions

 RuntimeDyldMachO (RTDyldMemoryManager *mm)
int64_t memcpyAddend (const RelocationEntry &RE) const
RelocationEntry getRelocationEntry (unsigned SectionID, ObjectImage &ObjImg, const relocation_iterator &RI) const
RelocationValueRef getRelocationValueRef (ObjectImage &ObjImg, const relocation_iterator &RI, const RelocationEntry &RE, ObjSectionToIDMap &ObjSectionToID, const SymbolTableMap &Symbols)
void makeValueAddendPCRel (RelocationValueRef &Value, ObjectImage &ObjImg, const relocation_iterator &RI, unsigned OffsetToNextPC)
 Make the RelocationValueRef addend PC-relative.
void dumpRelocationToResolve (const RelocationEntry &RE, uint64_t Value) const
 Dump information about the relocation entry (RE) and resolved value.
void populateIndirectSymbolPointersSection (MachOObjectFile &Obj, const SectionRef &PTSection, unsigned PTSectionID)

Static Protected Member Functions

static section_iterator getSectionByAddress (const MachOObjectFile &Obj, uint64_t Addr)

Protected Attributes

SmallVector
< EHFrameRelatedSections, 2 > 
UnregisteredEHFrameSections

Detailed Description

Definition at line 28 of file RuntimeDyldMachO.h.


Constructor & Destructor Documentation

Definition at line 53 of file RuntimeDyldMachO.h.


Member Function Documentation

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]
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().

Definition at line 131 of file RuntimeDyldMachO.h.

section_iterator llvm::RuntimeDyldMachO::getSectionByAddress ( const MachOObjectFile Obj,
uint64_t  Addr 
) [static, protected]

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]
void llvm::RuntimeDyldMachO::makeValueAddendPCRel ( RelocationValueRef Value,
ObjectImage ObjImg,
const relocation_iterator RI,
unsigned  OffsetToNextPC 
) [protected]
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]

Member Data Documentation

Definition at line 51 of file RuntimeDyldMachO.h.


The documentation for this class was generated from the following files: