diff options
author | Lang Hames <lhames@gmail.com> | 2013-12-07 04:25:19 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2013-12-07 04:25:19 +0000 |
commit | a49701db7d54967aea8a511743fedcfb9b056eea (patch) | |
tree | dab70cd2963ff5ea01065de2243e1ed0b2363c03 /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | |
parent | d4ef813fd5efc03775fea5694b06c126e429de2d (diff) | |
download | llvm-a49701db7d54967aea8a511743fedcfb9b056eea.tar.gz llvm-a49701db7d54967aea8a511743fedcfb9b056eea.tar.bz2 llvm-a49701db7d54967aea8a511743fedcfb9b056eea.tar.xz |
Revert r196639 while I investigate a bot failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 68e86d86b6..f2c69fc99c 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -25,8 +25,6 @@ #include "llvm/Object/ELFObjectFile.h" #include "llvm/Object/ObjectFile.h" #include "llvm/Support/ELF.h" -#include "llvm/Support/MemoryBuffer.h" - using namespace llvm; using namespace llvm::object; @@ -180,39 +178,6 @@ void RuntimeDyldELF::deregisterEHFrames() { RegisteredEHFrameSections.clear(); } -ObjectImage *RuntimeDyldELF::createObjectImageFromFile(object::ObjectFile *ObjFile) { - if (!ObjFile) - return NULL; - - error_code ec; - MemoryBuffer* Buffer = MemoryBuffer::getMemBuffer(ObjFile->getData(), - "", - false); - - if (ObjFile->getBytesInAddress() == 4 && ObjFile->isLittleEndian()) { - DyldELFObject<ELFType<support::little, 4, false> > *Obj = - new DyldELFObject<ELFType<support::little, 4, false> >(Buffer, ec); - return new ELFObjectImage<ELFType<support::little, 4, false> >(NULL, Obj); - } - else if (ObjFile->getBytesInAddress() == 4 && !ObjFile->isLittleEndian()) { - DyldELFObject<ELFType<support::big, 4, false> > *Obj = - new DyldELFObject<ELFType<support::big, 4, false> >(Buffer, ec); - return new ELFObjectImage<ELFType<support::big, 4, false> >(NULL, Obj); - } - else if (ObjFile->getBytesInAddress() == 8 && !ObjFile->isLittleEndian()) { - DyldELFObject<ELFType<support::big, 8, true> > *Obj = - new DyldELFObject<ELFType<support::big, 8, true> >(Buffer, ec); - return new ELFObjectImage<ELFType<support::big, 8, true> >(NULL, Obj); - } - else if (ObjFile->getBytesInAddress() == 8 && ObjFile->isLittleEndian()) { - DyldELFObject<ELFType<support::little, 8, true> > *Obj = - new DyldELFObject<ELFType<support::little, 8, true> >(Buffer, ec); - return new ELFObjectImage<ELFType<support::little, 8, true> >(NULL, Obj); - } - else - llvm_unreachable("Unexpected ELF format"); -} - ObjectImage *RuntimeDyldELF::createObjectImage(ObjectBuffer *Buffer) { if (Buffer->getBufferSize() < ELF::EI_NIDENT) llvm_unreachable("Unexpected ELF object size"); @@ -1438,9 +1403,4 @@ bool RuntimeDyldELF::isCompatibleFormat(const ObjectBuffer *Buffer) const { return false; return (memcmp(Buffer->getBufferStart(), ELF::ElfMagic, strlen(ELF::ElfMagic))) == 0; } - -bool RuntimeDyldELF::isCompatibleFile(const object::ObjectFile *Obj) const { - return Obj->isELF(); -} - } // namespace llvm |