LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
llvm::object::Binary Class Reference

#include "llvm/Object/Binary.h"

Inheritance diagram for llvm::object::Binary:
Inheritance graph
[legend]

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 isGOFF () 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_GOFF , 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
 

Detailed Description

Definition at line 32 of file Binary.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
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_GOFF 
ID_Wasm 
ID_EndObjects 

Definition at line 41 of file Binary.h.

Constructor & Destructor Documentation

◆ Binary() [1/3]

Binary::Binary ( unsigned int  Type,
MemoryBufferRef  Source 
)
protected

Definition at line 36 of file Binary.cpp.

◆ Binary() [2/3]

llvm::object::Binary::Binary ( )
delete

◆ Binary() [3/3]

llvm::object::Binary::Binary ( const Binary other)
delete

◆ ~Binary()

Binary::~Binary ( )
virtualdefault

Member Function Documentation

◆ checkOffset()

static Error llvm::object::Binary::checkOffset ( MemoryBufferRef  M,
uintptr_t  Addr,
const uint64_t  Size 
)
inlinestatic

◆ getData()

StringRef Binary::getData ( ) const

◆ getELFType()

static unsigned int llvm::object::Binary::getELFType ( bool  isLE,
bool  is64Bits 
)
inlinestaticprotected

Definition at line 78 of file Binary.h.

References ID_ELF32B, ID_ELF32L, ID_ELF64B, and ID_ELF64L.

Referenced by llvm::object::ELFObjectFile< ELFT >::classof().

◆ getFileName()

StringRef Binary::getFileName ( ) const

◆ getMachOType()

static unsigned int llvm::object::Binary::getMachOType ( bool  isLE,
bool  is64Bits 
)
inlinestaticprotected

Definition at line 85 of file Binary.h.

References ID_MachO32B, ID_MachO32L, ID_MachO64B, and ID_MachO64L.

Referenced by llvm::object::MachOObjectFile::is64Bit().

◆ getMemoryBufferRef()

MemoryBufferRef Binary::getMemoryBufferRef ( ) const

◆ getTripleObjectFormat()

Triple::ObjectFormatType llvm::object::Binary::getTripleObjectFormat ( ) const
inline

◆ getType()

unsigned int llvm::object::Binary::getType ( ) const
inline

◆ initContent()

virtual Error llvm::object::Binary::initContent ( )
inlinevirtual

Reimplemented in llvm::object::ELFObjectFile< ELFT >.

Definition at line 97 of file Binary.h.

References llvm::Error::success().

◆ isArchive()

bool llvm::object::Binary::isArchive ( ) const
inline

Definition at line 115 of file Binary.h.

References ID_Archive.

◆ isCOFF()

bool llvm::object::Binary::isCOFF ( ) const
inline

◆ isCOFFImportFile()

bool llvm::object::Binary::isCOFFImportFile ( ) const
inline

Definition at line 141 of file Binary.h.

References ID_COFFImportFile.

Referenced by isAnyArm64COFF(), isECObject(), and isSymbolic().

◆ isELF()

bool llvm::object::Binary::isELF ( ) const
inline

◆ isGOFF()

bool llvm::object::Binary::isGOFF ( ) const
inline

Definition at line 149 of file Binary.h.

References ID_GOFF.

Referenced by getTripleObjectFormat(), and llvm::object::ObjectFile::makeTriple().

◆ isIR()

bool llvm::object::Binary::isIR ( ) const
inline

Definition at line 145 of file Binary.h.

References ID_IR.

Referenced by isAnyArm64COFF(), isECObject(), and isSymbolic().

◆ isLittleEndian()

bool llvm::object::Binary::isLittleEndian ( ) const
inline

◆ isMachO()

bool llvm::object::Binary::isMachO ( ) const
inline

◆ isMachOUniversalBinary()

bool llvm::object::Binary::isMachOUniversalBinary ( ) const
inline

Definition at line 117 of file Binary.h.

References ID_MachOUniversalBinary.

◆ isMinidump()

bool llvm::object::Binary::isMinidump ( ) const
inline

Definition at line 151 of file Binary.h.

References ID_Minidump.

◆ isObject()

bool llvm::object::Binary::isObject ( ) const
inline

Definition at line 107 of file Binary.h.

References ID_EndObjects, and ID_StartObjects.

Referenced by isSymbolic().

◆ isOffloadFile()

bool llvm::object::Binary::isOffloadFile ( ) const
inline

Definition at line 139 of file Binary.h.

References ID_Offload.

◆ isSymbolic()

bool llvm::object::Binary::isSymbolic ( ) const
inline

Definition at line 111 of file Binary.h.

References isCOFFImportFile(), isIR(), isObject(), and isTapiFile().

◆ isTapiFile()

bool llvm::object::Binary::isTapiFile ( ) const
inline

Definition at line 153 of file Binary.h.

References ID_TapiFile.

Referenced by isSymbolic().

◆ isTapiUniversal()

bool llvm::object::Binary::isTapiUniversal ( ) const
inline

Definition at line 121 of file Binary.h.

References ID_TapiUniversal.

◆ isWasm()

bool llvm::object::Binary::isWasm ( ) const
inline

◆ isWinRes()

bool llvm::object::Binary::isWinRes ( ) const
inline

Definition at line 161 of file Binary.h.

References ID_WinRes.

◆ isXCOFF()

bool llvm::object::Binary::isXCOFF ( ) const
inline

Definition at line 135 of file Binary.h.

References ID_XCOFF32, and ID_XCOFF64.

Referenced by llvm::object::ObjectFile::makeTriple().

Member Data Documentation

◆ Data

MemoryBufferRef llvm::object::Binary::Data
protected

Definition at line 37 of file Binary.h.

Referenced by llvm::object::Archive::Archive(), llvm::object::ObjectFile::base(), llvm::object::BigArchive::BigArchive(), llvm::object::Archive::child_begin(), llvm::object::MinidumpFile::create(), llvm::object::ObjectFile::createObjectFile(), llvm::object::SymbolicFile::createSymbolicFile(), llvm::object::Archive::Child::getBuffer(), llvm::object::Archive::Child::getChildOffset(), llvm::object::COFFImportFile::getCOFFImportHeader(), llvm::object::ELFObjectFileBase::getCrelDecodeProblem(), getData(), llvm::object::COFFImportFile::getExportName(), getFileName(), getGlobalSymtabLocAndSize(), llvm::object::COFFObjectFile::getHybridObjectView(), llvm::object::XCOFFObjectFile::getImportFileTable(), llvm::object::ImportDirectoryEntryRef::getImportTableEntry(), getMemoryBufferRef(), llvm::object::MinidumpFile::getMemoryInfoList(), llvm::object::Archive::Child::getNext(), llvm::object::XCOFFObjectFile::getRawData(), llvm::object::COFFObjectFile::getRelocations(), llvm::object::COFFObjectFile::getSectionContents(), llvm::object::XCOFFObjectFile::getSectionContents(), llvm::object::XCOFFObjectFile::getSectionFileOffsetToRawData(), llvm::object::Archive::Child::getSize(), llvm::object::GOFFObjectFile::GOFFObjectFile(), llvm::object::Archive::isEmpty(), llvm::object::MachOUniversalBinary::MachOUniversalBinary(), llvm::object::COFFImportFile::printSymbolName(), llvm::object::XCOFFObjectFile::relocations(), llvm::object::COFFObjectFile::section_rel_begin(), llvm::object::COFFObjectFile::section_rel_end(), and llvm::object::OffloadBinary::write().


The documentation for this class was generated from the following files: