LLVM
17.0.0git
|
#include "llvm/Object/Binary.h"
Public Member Functions | |
Binary ()=delete | |
Binary (const Binary &other)=delete | |
virtual | ~Binary () |
virtual Error | initContent () |
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 | isTapiUniversal () const |
bool | isELF () const |
bool | isMachO () const |
bool | isCOFF () const |
bool | isXCOFF () const |
bool | isWasm () const |
bool | isOffloadFile () const |
bool | isCOFFImportFile () const |
bool | isIR () const |
bool | isMinidump () const |
bool | isTapiFile () const |
bool | isLittleEndian () const |
bool | isWinRes () const |
Triple::ObjectFormatType | getTripleObjectFormat () const |
Static Public Member Functions | |
static Error | checkOffset (MemoryBufferRef M, uintptr_t Addr, const uint64_t Size) |
Protected Types | |
enum | { ID_Archive, ID_MachOUniversalBinary, ID_COFFImportFile, ID_IR, ID_TapiUniversal, ID_TapiFile, ID_Minidump, ID_WinRes, ID_Offload, ID_StartObjects, ID_COFF, ID_XCOFF32, ID_XCOFF64, 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 |
|
virtualdefault |
|
inlinestatic |
Definition at line 170 of file Binary.h.
References Addr, llvm::errorCodeToError(), M, llvm::Error::success(), and llvm::object::unexpected_eof.
Referenced by getFirstReloc(), getObject(), 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::getName(), llvm::object::BigArchiveMemberHeader::getNextChildLoc(), llvm::object::ArchiveMemberHeader::getRawName(), llvm::object::BigArchiveMemberHeader::getRawName(), llvm::object::MachOObjectFile::getSectionContents(), llvm::object::MachOObjectFile::getSectionSize(), llvm::object::MachOObjectFile::getStringTableData(), llvm::MCJIT::notifyFreeingObject(), llvm::MCJIT::notifyObjectLoaded(), llvm::object::MachOUniversalBinary::ObjectForArch::ObjectForArch(), and llvm::object::MachOObjectFile::ReadULEB128s().
|
inlinestaticprotected |
StringRef Binary::getFileName | ( | ) | const |
Definition at line 41 of file Binary.cpp.
References Data, and llvm::MemoryBufferRef::getBufferIdentifier().
Referenced by llvm::jitlink::COFFLinkGraphBuilder::COFFLinkGraphBuilder(), llvm::object::IRObjectFile::findBitcodeInObject(), llvm::orc::getCOFFObjectFileSymbolInfo(), llvm::orc::getELFObjectFileSymbolInfo(), llvm::pdb::InputFile::getFilePath(), and llvm::orc::getMachOObjectFileSymbolInfo().
|
inlinestaticprotected |
Definition at line 84 of file Binary.h.
References ID_MachO32B, ID_MachO32L, ID_MachO64B, and ID_MachO64L.
Referenced by llvm::object::MachOObjectFile::is64Bit().
MemoryBufferRef Binary::getMemoryBufferRef | ( | ) | const |
Definition at line 43 of file Binary.cpp.
References Data.
Referenced by llvm::object::Archive::Child::getAsBinary(), llvm::object::TapiUniversal::ObjectForArch::getAsObjectFile(), and llvm::object::ArchiveMemberHeader::getNextChildLoc().
|
inline |
Definition at line 160 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 103 of file Binary.h.
Referenced by llvm::object::ELFObjectFile< ELFT >::classof(), and llvm::object::MachOObjectFile::is64Bit().
|
inlinevirtual |
Reimplemented in llvm::object::ELFObjectFile< ELFT >.
Definition at line 96 of file Binary.h.
References llvm::Error::success().
|
inline |
Definition at line 114 of file Binary.h.
References ID_Archive.
Referenced by llvm::object::Archive::classof().
|
inline |
Definition at line 130 of file Binary.h.
References ID_COFF.
Referenced by llvm::object::COFFObjectFile::classof(), llvm::object::getRelocationResolver(), getTripleObjectFormat(), llvm::RuntimeDyldCOFF::isCompatibleFile(), llvm::RuntimeDyld::loadObject(), and llvm::object::ObjectFile::makeTriple().
|
inline |
Definition at line 140 of file Binary.h.
References ID_COFFImportFile.
Referenced by llvm::object::COFFImportFile::classof(), and isSymbolic().
|
inline |
Definition at line 122 of file Binary.h.
References ID_ELF32L, and ID_ELF64B.
Referenced by llvm::object::ELFObjectFileBase::classof(), llvm::InstrProfCorrelatorImpl< IntPtrT >::get(), llvm::object::getRelocationResolver(), getTripleObjectFormat(), llvm::RuntimeDyldELF::isCompatibleFile(), loadObj(), and llvm::RuntimeDyld::loadObject().
|
inline |
Definition at line 144 of file Binary.h.
References ID_IR.
Referenced by llvm::object::IRObjectFile::classof(), and isSymbolic().
|
inline |
Definition at line 152 of file Binary.h.
References ID_ELF32B, ID_ELF64B, ID_MachO32B, ID_MachO64B, ID_XCOFF32, and ID_XCOFF64.
Referenced by llvm::symbolize::SymbolizableObjectFile::create(), llvm::object::MachOObjectFile::getChainedFixupsSegments(), llvm::object::MachOObjectFile::getDyldChainedFixupTargets(), llvm::object::MachOObjectFile::getPlainRelocationExternal(), llvm::object::MachOObjectFile::getPlainRelocationSymbolNum(), llvm::RuntimeDyldImpl::loadObjectImpl(), llvm::object::MachOChainedFixupEntry::moveNext(), and llvm::object::ELFObjectFileBase::setARMSubArch().
|
inline |
Definition at line 126 of file Binary.h.
References ID_MachO32L, and ID_MachO64B.
Referenced by llvm::object::MachOObjectFile::classof(), llvm::InstrProfCorrelatorImpl< IntPtrT >::get(), llvm::object::getRelocationResolver(), getRemarksSectionName(), getTripleObjectFormat(), llvm::RuntimeDyldMachO::isCompatibleFile(), loadObj(), llvm::RuntimeDyld::loadObject(), and llvm::object::ObjectFile::makeTriple().
|
inline |
Definition at line 116 of file Binary.h.
References ID_MachOUniversalBinary.
Referenced by llvm::object::MachOUniversalBinary::classof().
|
inline |
Definition at line 148 of file Binary.h.
References ID_Minidump.
|
inline |
Definition at line 106 of file Binary.h.
References ID_EndObjects, and ID_StartObjects.
Referenced by llvm::object::ObjectFile::classof(), and isSymbolic().
|
inline |
Definition at line 138 of file Binary.h.
References ID_Offload.
Referenced by llvm::object::OffloadBinary::classof().
|
inline |
Definition at line 110 of file Binary.h.
References isCOFFImportFile(), isIR(), isObject(), and isTapiFile().
Referenced by llvm::object::SymbolicFile::classof().
|
inline |
Definition at line 150 of file Binary.h.
References ID_TapiFile.
Referenced by llvm::object::TapiFile::classof(), and isSymbolic().
|
inline |
Definition at line 120 of file Binary.h.
References ID_TapiUniversal.
Referenced by llvm::object::TapiUniversal::classof().
|
inline |
Definition at line 136 of file Binary.h.
References ID_Wasm.
Referenced by llvm::object::WasmObjectFile::classof(), and llvm::object::getRelocationResolver().
|
inline |
Definition at line 158 of file Binary.h.
References ID_WinRes.
Referenced by llvm::object::WindowsResource::classof().
|
inline |
Definition at line 134 of file Binary.h.
References ID_XCOFF32, and ID_XCOFF64.
Referenced by llvm::object::ObjectFile::makeTriple().
|
protected |
Definition at line 37 of file Binary.h.
Referenced by llvm::object::ObjectFile::base(), llvm::object::Archive::Child::getBuffer(), llvm::object::Archive::Child::getChildOffset(), llvm::object::COFFImportFile::getCOFFImportHeader(), getData(), getFileName(), llvm::object::XCOFFObjectFile::getImportFileTable(), llvm::object::ImportDirectoryEntryRef::getImportTableEntry(), getMemoryBufferRef(), llvm::object::Archive::Child::getNext(), llvm::object::COFFObjectFile::getRelocations(), llvm::object::COFFObjectFile::getSectionContents(), llvm::object::Archive::Child::getSize(), llvm::object::Archive::isEmpty(), llvm::object::BigArchive::isEmpty(), llvm::object::COFFImportFile::printSymbolName(), llvm::object::XCOFFObjectFile::relocations(), llvm::object::COFFObjectFile::section_rel_begin(), llvm::object::COFFObjectFile::section_rel_end(), and llvm::object::COFFObjectFile::toSymb().