Basic runtime dynamic loading capabilities added to ELFObjectFile, implemented

in a subclass named DyldELFObject. This class supports rebasing the object file
it represents by re-mapping section addresses to the actual memory addresses
the object was placed in. This is required for MC-JIT implementation on ELF with
debugging support.

Patch reviewed on llvm-commits.

Developed together with Ashok Thirumurthi and Andrew Kaylor.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148653 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Bendersky
2012-01-22 09:01:03 +00:00
parent 76463fdeb6
commit 24973c1063
3 changed files with 254 additions and 20 deletions

View File

@@ -20,6 +20,7 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include <cstring>
#include <vector>
namespace llvm {
namespace object {
@@ -337,7 +338,8 @@ public:
public:
static ObjectFile *createCOFFObjectFile(MemoryBuffer *Object);
static ObjectFile *createELFObjectFile(MemoryBuffer *Object);
static ObjectFile *createELFObjectFile(MemoryBuffer *Object,
bool doDyld = false, std::vector<uint8_t*> *MemoryMap = 0);
static ObjectFile *createMachOObjectFile(MemoryBuffer *Object);
};