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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames
2014-01-08 04:09:09 +00:00
parent 0fe78d5669
commit 42fdb1f00f
12 changed files with 314 additions and 10 deletions

View File

@@ -20,6 +20,10 @@
namespace llvm {
namespace object {
class ObjectFile;
}
class ObjectImageCommon : public ObjectImage {
ObjectImageCommon(); // = delete
ObjectImageCommon(const ObjectImageCommon &other); // = delete
@@ -42,6 +46,8 @@ public:
{
ObjFile = object::ObjectFile::createObjectFile(Buffer->getMemBuffer());
}
ObjectImageCommon(object::ObjectFile* Input)
: ObjectImage(NULL), ObjFile(Input) {}
virtual ~ObjectImageCommon() { delete ObjFile; }
virtual object::symbol_iterator begin_symbols() const