From c41ab789a052d7a8a4eacecfa1edd4af0d933990 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 6 Apr 2011 01:11:05 +0000 Subject: RuntimeDyld should use the memory manager API. Start teaching the runtime Dyld interface to use the memory manager API for allocating space. Rather than mapping directly into the MachO object, we extract the payload for each object and copy it into a dedicated buffer allocated via the memory manager. For now, just do Segment64, so this works on x86_64, but not yet on ARM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128973 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-rtdyld/llvm-rtdyld.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/llvm-rtdyld/llvm-rtdyld.cpp b/tools/llvm-rtdyld/llvm-rtdyld.cpp index e09f14ad78..ddd6683a2f 100644 --- a/tools/llvm-rtdyld/llvm-rtdyld.cpp +++ b/tools/llvm-rtdyld/llvm-rtdyld.cpp @@ -44,14 +44,14 @@ Action(cl::desc("Action to perform:"), // support library allocation routines directly. class TrivialMemoryManager : public RTDyldMemoryManager { public: - uint64_t startFunctionBody(const char *Name, uintptr_t &Size); - void endFunctionBody(const char *Name, uint64_t FunctionStart, - uint64_t FunctionEnd) {} + uint8_t *startFunctionBody(const char *Name, uintptr_t &Size); + void endFunctionBody(const char *Name, uint8_t *FunctionStart, + uint8_t *FunctionEnd) {} }; -uint64_t TrivialMemoryManager::startFunctionBody(const char *Name, +uint8_t *TrivialMemoryManager::startFunctionBody(const char *Name, uintptr_t &Size) { - return (uint64_t)sys::Memory::AllocateRWX(Size, 0, 0).base(); + return (uint8_t*)sys::Memory::AllocateRWX(Size, 0, 0).base(); } static const char *ProgramName; -- cgit v1.2.3-70-g09d2