LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::MCJITMemoryManager Class Reference

#include "llvm/ExecutionEngine/RTDyldMemoryManager.h"

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

Public Member Functions

virtual void notifyObjectLoaded (ExecutionEngine *EE, const object::ObjectFile &)
 This method is called after an object has been loaded into memory but before relocations are applied to the loaded sections. More...
 
- Public Member Functions inherited from llvm::RuntimeDyld::MemoryManager
 MemoryManager ()=default
 
virtual ~MemoryManager ()=default
 
virtual uint8_t * allocateCodeSection (uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName)=0
 Allocate a memory block of (at least) the given size suitable for executable code. More...
 
virtual uint8_t * allocateDataSection (uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName, bool IsReadOnly)=0
 Allocate a memory block of (at least) the given size suitable for data. More...
 
virtual void reserveAllocationSpace (uintptr_t CodeSize, uint32_t CodeAlign, uintptr_t RODataSize, uint32_t RODataAlign, uintptr_t RWDataSize, uint32_t RWDataAlign)
 Inform the memory manager about the total amount of memory required to allocate all sections to be loaded: CodeSize - the total size of all code sections DataSizeRO - the total size of all read-only data sections DataSizeRW - the total size of all read-write data sections. More...
 
virtual bool needsToReserveAllocationSpace ()
 Override to return true to enable the reserveAllocationSpace callback. More...
 
virtual void registerEHFrames (uint8_t *Addr, uint64_t LoadAddr, size_t Size)=0
 Register the EH frames with the runtime so that c++ exceptions work. More...
 
virtual void deregisterEHFrames ()=0
 
virtual bool finalizeMemory (std::string *ErrMsg=nullptr)=0
 This method is called when object loading is complete and section page permissions can be applied. More...
 
virtual void notifyObjectLoaded (RuntimeDyld &RTDyld, const object::ObjectFile &Obj)
 This method is called after an object has been loaded into memory but before relocations are applied to the loaded sections. More...
 

Detailed Description

Definition at line 33 of file RTDyldMemoryManager.h.

Member Function Documentation

◆ notifyObjectLoaded()

virtual void llvm::MCJITMemoryManager::notifyObjectLoaded ( ExecutionEngine EE,
const object::ObjectFile  
)
inlinevirtual

This method is called after an object has been loaded into memory but before relocations are applied to the loaded sections.

The object load may have been initiated by MCJIT to resolve an external symbol for another object that is being finalized. In that case, the object about which the memory manager is being notified will be finalized immediately after the memory manager returns from this call.

Memory managers which are preparing code for execution in an external address space can use this call to remap the section addresses for the newly loaded object.

Definition at line 48 of file RTDyldMemoryManager.h.


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