3 #include <llvm/ExecutionEngine/SectionMemoryManager.h>
5 #if LLVM_VERSION_MAJOR < 16
6 namespace llvm_helper {
7 using Align = uint32_t;
10 namespace llvm_helper {
11 using Align = llvm::Align;
18 uint8_t *Addr =
nullptr, *End =
nullptr;
19 void Reset(uint8_t* Ptr, uintptr_t Size);
20 uint8_t* Next(uintptr_t Size,
unsigned Alignment);
22 Block Code, ROData, RWData;
25 uint8_t* allocateCodeSection(
26 uintptr_t Size,
unsigned Align,
unsigned ID, llvm::StringRef Name)
final;
28 uint8_t* allocateDataSection(
29 uintptr_t Size,
unsigned Align,
unsigned ID, llvm::StringRef Name,
bool RO)
final;
31 void reserveAllocationSpace(
32 uintptr_t CodeSize, llvm_helper::Align CodeAlign, uintptr_t ROSize, llvm_helper::Align ROAlign,
33 uintptr_t RWSize, llvm_helper::Align RWAlign)
final;
35 bool needsToReserveAllocationSpace()
override {
return true; }
37 using llvm::SectionMemoryManager::EHFrameInfos;
41 void deregisterEHFrames()
override;
43 bool finalizeMemory(std::string* ErrMsg)
override;
46 uintptr_t ImageBase = 0;
Definition: SectionMemoryManager.hpp:15