diff options
author | Lang Hames <lhames@gmail.com> | 2014-01-08 04:09:09 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2014-01-08 04:09:09 +0000 |
commit | 173c69f2267594d2dbba0bde2a81e55c8e494987 (patch) | |
tree | 5d0ce595950f9807300c153a5a553ec119a1aa4a /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h | |
parent | 7e34cc4dbda1139bd6d05cbcba82cc7f3935a577 (diff) | |
download | bcm5719-llvm-173c69f2267594d2dbba0bde2a81e55c8e494987.tar.gz bcm5719-llvm-173c69f2267594d2dbba0bde2a81e55c8e494987.zip |
Re-apply r196639: Add support for archives and object file caching under MCJIT.
I believe the bot failures on linux systems were due to overestimating the
alignment of object-files within archives, which are only guaranteed to be
two-byte aligned. I have reduced the alignment in
RuntimeDyldELF::createObjectImageFromFile accordingly.
llvm-svn: 198737
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h index 634f6cebe1c..56970aebef4 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h @@ -311,12 +311,18 @@ protected: virtual void updateGOTEntries(StringRef Name, uint64_t Addr) {} virtual ObjectImage *createObjectImage(ObjectBuffer *InputBuffer); + virtual ObjectImage *createObjectImageFromFile(object::ObjectFile *InputObject); + + // This is the implementation for the two public overloads + ObjectImage *loadObject(ObjectImage *InputObject); + public: RuntimeDyldImpl(RTDyldMemoryManager *mm) : MemMgr(mm), HasError(false) {} virtual ~RuntimeDyldImpl(); ObjectImage *loadObject(ObjectBuffer *InputBuffer); + ObjectImage *loadObject(object::ObjectFile *InputObject); void *getSymbolAddress(StringRef Name) { // FIXME: Just look up as a function for now. Overly simple of course. @@ -354,6 +360,7 @@ public: StringRef getErrorString() { return ErrorStr; } virtual bool isCompatibleFormat(const ObjectBuffer *Buffer) const = 0; + virtual bool isCompatibleFile(const ObjectFile *Obj) const = 0; virtual void registerEHFrames(); |