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 | 567befd88fd6e21ab9c02c5db51a753b9430dc68 (patch) | |
tree | 3db9b3f5c5daf9894e1cc5512baf6e31308b56f3 /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | |
parent | 2ce64a7d9e2dd1fa614680da69dafbe682687e13 (diff) | |
download | bcm5719-llvm-567befd88fd6e21ab9c02c5db51a753b9430dc68.tar.gz bcm5719-llvm-567befd88fd6e21ab9c02c5db51a753b9430dc68.zip |
Revert r196639 while I investigate a bot failure.
llvm-svn: 196641
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 68e86d86b6e..f2c69fc99ce 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/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 |