LLVM
8.0.1
|
#include "llvm/Object/Binary.h"
Public Member Functions | |
Binary ()=delete | |
Binary (const Binary &other)=delete | |
virtual | ~Binary () |
StringRef | getData () const |
StringRef | getFileName () const |
MemoryBufferRef | getMemoryBufferRef () const |
unsigned int | getType () const |
bool | isObject () const |
bool | isSymbolic () const |
bool | isArchive () const |
bool | isMachOUniversalBinary () const |
bool | isELF () const |
bool | isMachO () const |
bool | isCOFF () const |
bool | isWasm () const |
bool | isCOFFImportFile () const |
bool | isIR () const |
bool | isLittleEndian () const |
bool | isWinRes () const |
Triple::ObjectFormatType | getTripleObjectFormat () const |
Static Public Member Functions | |
static std::error_code | checkOffset (MemoryBufferRef M, uintptr_t Addr, const uint64_t Size) |
Protected Types | |
enum | { ID_Archive, ID_MachOUniversalBinary, ID_COFFImportFile, ID_IR, ID_WinRes, ID_StartObjects, ID_COFF, ID_ELF32L, ID_ELF32B, ID_ELF64L, ID_ELF64B, ID_MachO32L, ID_MachO32B, ID_MachO64L, ID_MachO64B, ID_Wasm, ID_EndObjects } |
Protected Member Functions | |
Binary (unsigned int Type, MemoryBufferRef Source) | |
Static Protected Member Functions | |
static unsigned int | getELFType (bool isLE, bool is64Bits) |
static unsigned int | getMachOType (bool isLE, bool is64Bits) |
Protected Attributes | |
MemoryBufferRef | Data |
|
protected |
|
protected |
Definition at line 36 of file Binary.cpp.
References llvm::Data.
|
delete |
Referenced by getMachOType().
|
virtualdefault |
Referenced by getMachOType().
|
inlinestatic |
Definition at line 148 of file Binary.h.
References Context, llvm::object::createBinary(), llvm::MemoryBufferRef::getBufferEnd(), llvm::MemoryBufferRef::getBufferStart(), Other, llvm::Sched::Source, and llvm::object::unexpected_eof.
Referenced by getFirstReloc(), llvm::object::COFFObjectFile::getHintName(), getObject(), llvm::object::ELFObjectFile< ELFT >::getSectionContents(), llvm::object::COFFObjectFile::getSectionContents(), and llvm::object::COFFObjectFile::toSymb().
StringRef Binary::getData | ( | ) | const |
Definition at line 39 of file Binary.cpp.
References Data, and llvm::MemoryBufferRef::getBuffer().
Referenced by llvm::object::ArchiveMemberHeader::getAccessMode(), llvm::object::MachOUniversalBinary::ObjectForArch::getAsArchive(), llvm::object::MachOUniversalBinary::ObjectForArch::getAsObjectFile(), llvm::object::ArchiveMemberHeader::getGID(), llvm::object::ArchiveMemberHeader::getLastModified(), getMachOType(), llvm::object::ArchiveMemberHeader::getName(), llvm::object::Archive::Child::getNext(), llvm::object::ArchiveMemberHeader::getRawName(), llvm::object::ArchiveMemberHeader::getSize(), llvm::object::ArchiveMemberHeader::getUID(), llvm::MCJIT::notifyFreeingObject(), llvm::MCJIT::notifyObjectLoaded(), llvm::object::MachOUniversalBinary::ObjectForArch::ObjectForArch(), and llvm::object::MachOObjectFile::ReadULEB128s().
|
inlinestaticprotected |
Definition at line 68 of file Binary.h.
References ID_ELF32B, ID_ELF32L, ID_ELF64B, and ID_ELF64L.
Referenced by llvm::object::ELFObjectFile< ELFT >::classof(), and llvm::object::ELFObjectFile< ELFT >::create().
StringRef Binary::getFileName | ( | ) | const |
Definition at line 41 of file Binary.cpp.
References Data, and llvm::MemoryBufferRef::getBufferIdentifier().
Referenced by llvm::RuntimeDyldImpl::emitCommonSymbols(), llvm::RuntimeDyldImpl::emitSection(), llvm::RuntimeDyldELF::finalizeLoad(), llvm::object::IRObjectFile::findBitcodeInObject(), llvm::object::MachOUniversalBinary::ObjectForArch::getAsArchive(), llvm::object::MachOUniversalBinary::ObjectForArch::getAsObjectFile(), and getMachOType().
|
inlinestaticprotected |
Definition at line 75 of file Binary.h.
References Binary(), getData(), getFileName(), getMemoryBufferRef(), ID_MachO32B, ID_MachO32L, ID_MachO64B, ID_MachO64L, and ~Binary().
MemoryBufferRef Binary::getMemoryBufferRef | ( | ) | const |
Definition at line 43 of file Binary.cpp.
References Data.
Referenced by __jit_debug_register_code(), llvm::object::Archive::Child::getFullName(), getMachOType(), and llvm::object::ELFObjectFile< ELFT >::getSectionContents().
|
inline |
Definition at line 138 of file Binary.h.
References llvm::Triple::COFF, llvm::Triple::ELF, isCOFF(), isELF(), isMachO(), llvm::Triple::MachO, and llvm::Triple::UnknownObjectFormat.
|
inline |
Definition at line 92 of file Binary.h.
Referenced by llvm::object::ELFObjectFile< ELFT >::classof().
|
inline |
Definition at line 101 of file Binary.h.
References ID_Archive.
Referenced by llvm::object::Archive::classof().
|
inline |
Definition at line 117 of file Binary.h.
References ID_COFF.
Referenced by llvm::object::COFFObjectFile::classof(), getTripleObjectFormat(), llvm::RuntimeDyldCOFF::isCompatibleFile(), llvm::RuntimeDyld::loadObject(), and llvm::object::ObjectFile::makeTriple().
|
inline |
Definition at line 123 of file Binary.h.
References ID_COFFImportFile.
Referenced by llvm::object::COFFImportFile::classof(), and isSymbolic().
|
inline |
Definition at line 109 of file Binary.h.
References ID_ELF32L, and ID_ELF64B.
Referenced by llvm::object::ELFObjectFileBase::classof(), getTripleObjectFormat(), llvm::RuntimeDyldELF::isCompatibleFile(), loadObj(), and llvm::RuntimeDyld::loadObject().
|
inline |
Definition at line 127 of file Binary.h.
References ID_IR.
Referenced by llvm::object::IRObjectFile::classof(), and isSymbolic().
|
inline |
Definition at line 131 of file Binary.h.
References ID_ELF32B, ID_ELF64B, ID_MachO32B, and ID_MachO64B.
Referenced by llvm::symbolize::SymbolizableObjectFile::create(), llvm::symbolize::LLVMSymbolizer::flush(), llvm::RuntimeDyldImpl::loadObjectImpl(), and llvm::object::ELFObjectFileBase::setARMSubArch().
|
inline |
Definition at line 113 of file Binary.h.
References ID_MachO32L, and ID_MachO64B.
Referenced by llvm::object::MachOObjectFile::classof(), getTripleObjectFormat(), llvm::RuntimeDyldMachO::isCompatibleFile(), loadObj(), llvm::RuntimeDyld::loadObject(), and llvm::object::ObjectFile::makeTriple().
|
inline |
Definition at line 105 of file Binary.h.
References ID_MachOUniversalBinary.
Referenced by llvm::object::MachOUniversalBinary::classof().
|
inline |
Definition at line 95 of file Binary.h.
References ID_EndObjects, and ID_StartObjects.
Referenced by llvm::object::ObjectFile::classof(), llvm::symbolize::LLVMSymbolizer::flush(), and isSymbolic().
|
inline |
Definition at line 99 of file Binary.h.
References isCOFFImportFile(), isIR(), and isObject().
Referenced by llvm::object::SymbolicFile::classof().
|
inline |
Definition at line 121 of file Binary.h.
References ID_Wasm.
Referenced by llvm::object::WasmObjectFile::classof().
|
inline |
Definition at line 136 of file Binary.h.
References ID_WinRes.
Referenced by llvm::object::WindowsResource::classof().
|
protected |
Definition at line 37 of file Binary.h.
Referenced by llvm::object::COFFObjectFile::COFFObjectFile(), llvm::object::Archive::Child::getChildOffset(), llvm::object::COFFImportFile::getCOFFImportHeader(), getData(), getFileName(), llvm::object::COFFObjectFile::getHintName(), getMemoryBufferRef(), llvm::object::Archive::Child::getNext(), llvm::object::COFFObjectFile::getRelocations(), llvm::object::COFFObjectFile::getSectionContents(), llvm::object::Archive::isEmpty(), llvm::object::ObjectFile::makeTriple(), llvm::object::COFFImportFile::printSymbolName(), llvm::object::readStringOrId(), llvm::object::COFFObjectFile::section_rel_begin(), llvm::object::COFFObjectFile::section_rel_end(), llvm::object::SymbolicFile::SymbolicFile(), and llvm::object::COFFObjectFile::toSymb().