LLVM 20.0.0git
Public Member Functions | List of all members
llvm::MCJITMemoryManager Class Reference

#include "llvm/ExecutionEngine/RTDyldMemoryManager.h"

Inheritance diagram for llvm::MCJITMemoryManager:
Inheritance 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.
 
- Public Member Functions inherited from llvm::RuntimeDyld::MemoryManager
 MemoryManager ()=default
 
virtual ~MemoryManager ()=default
 
virtual uint8_tallocateCodeSection (uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName)=0
 Allocate a memory block of (at least) the given size suitable for executable code.
 
virtual uint8_tallocateDataSection (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.
 
virtual TLSSection allocateTLSSection (uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName)
 Allocate a memory block of (at least) the given size to be used for thread-local storage (TLS).
 
virtual void reserveAllocationSpace (uintptr_t CodeSize, Align CodeAlign, uintptr_t RODataSize, Align RODataAlign, uintptr_t RWDataSize, Align 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.
 
virtual bool needsToReserveAllocationSpace ()
 Override to return true to enable the reserveAllocationSpace callback.
 
virtual bool allowStubAllocation () const
 Override to return false to tell LLVM no stub space will be needed.
 
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.
 
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.
 
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.
 

Detailed Description

Definition at line 32 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 47 of file RTDyldMemoryManager.h.


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