LLVM 22.0.0git
llvm::objcopy::coff::COFFObjectFile Class Reference

#include "llvm/Object/COFF.h"

Inheritance diagram for llvm::objcopy::coff::COFFObjectFile:
[legend]

Public Member Functions

uintptr_t getSymbolTable () const
StringRef getStringTable () const
uint16_t getMachine () const
uint16_t getSizeOfOptionalHeader () const
uint16_t getCharacteristics () const
uint32_t getTimeDateStamp () const
uint32_t getNumberOfSections () const
uint32_t getPointerToSymbolTable () const
uint32_t getRawNumberOfSymbols () const
uint32_t getNumberOfSymbols () const
uint32_t getStringTableSize () const
const export_directory_table_entrygetExportTable () const
const coff_load_configuration32getLoadConfig32 () const
const coff_load_configuration64getLoadConfig64 () const
const chpe_metadatagetCHPEMetadata () const
const coff_dynamic_reloc_tablegetDynamicRelocTable () const
StringRef getRelocationTypeName (uint16_t Type) const
Expected< StringRefgetSymbolName (COFFSymbolRef Symbol) const
Expected< StringRefgetSymbolName (const coff_symbol_generic *Symbol) const
Expected< StringRefgetSectionName (const coff_section *Sec) const
uint64_t getSectionSize (const coff_section *Sec) const
Error getSectionContents (const coff_section *Sec, ArrayRef< uint8_t > &Res) const
basic_symbol_iterator symbol_begin () const override
basic_symbol_iterator symbol_end () const override
section_iterator section_begin () const override
section_iterator section_end () const override
bool is64Bit () const override
const coff_sectiongetCOFFSection (const SectionRef &Section) const
COFFSymbolRef getCOFFSymbol (const DataRefImpl &Ref) const
COFFSymbolRef getCOFFSymbol (const SymbolRef &Symbol) const
const coff_relocationgetCOFFRelocation (const RelocationRef &Reloc) const
unsigned getSectionID (SectionRef Sec) const
unsigned getSymbolSectionID (SymbolRef Sym) const
uint8_t getBytesInAddress () const override
 The number of bytes used to represent an address in this object file format.
StringRef getFileFormatName () const override
Triple::ArchType getArch () const override
Expected< uint64_tgetStartAddress () const override
Expected< SubtargetFeaturesgetFeatures () const override
std::unique_ptr< MemoryBuffergetHybridObjectView () const
import_directory_iterator import_directory_begin () const
import_directory_iterator import_directory_end () const
delay_import_directory_iterator delay_import_directory_begin () const
delay_import_directory_iterator delay_import_directory_end () const
export_directory_iterator export_directory_begin () const
export_directory_iterator export_directory_end () const
base_reloc_iterator base_reloc_begin () const
base_reloc_iterator base_reloc_end () const
dynamic_reloc_iterator dynamic_reloc_begin () const
dynamic_reloc_iterator dynamic_reloc_end () const
const debug_directorydebug_directory_begin () const
const debug_directorydebug_directory_end () const
iterator_range< import_directory_iteratorimport_directories () const
iterator_range< delay_import_directory_iteratordelay_import_directories () const
iterator_range< export_directory_iteratorexport_directories () const
iterator_range< base_reloc_iteratorbase_relocs () const
iterator_range< dynamic_reloc_iteratordynamic_relocs () const
iterator_range< const debug_directory * > debug_directories () const
const coff_tls_directory32getTLSDirectory32 () const
const coff_tls_directory64getTLSDirectory64 () const
const dos_headergetDOSHeader () const
const coff_file_headergetCOFFHeader () const
const coff_bigobj_file_headergetCOFFBigObjHeader () const
const pe32_headergetPE32Header () const
const pe32plus_headergetPE32PlusHeader () const
const data_directorygetDataDirectory (uint32_t index) const
Expected< const coff_section * > getSection (int32_t index) const
Expected< COFFSymbolRefgetSymbol (uint32_t index) const
template<typename T>
Error getAuxSymbol (uint32_t index, const T *&Res) const
ArrayRef< uint8_tgetSymbolAuxData (COFFSymbolRef Symbol) const
uint32_t getSymbolIndex (COFFSymbolRef Symbol) const
size_t getSymbolTableEntrySize () const
ArrayRef< coff_relocationgetRelocations (const coff_section *Sec) const
uint64_t getImageBase () const
Error getVaPtr (uint64_t VA, uintptr_t &Res) const
Error getRvaPtr (uint32_t Rva, uintptr_t &Res, const char *ErrorContext=nullptr) const
Error getRvaAndSizeAsBytes (uint32_t RVA, uint32_t Size, ArrayRef< uint8_t > &Contents, const char *ErrorContext=nullptr) const
 Given an RVA base and size, returns a valid array of bytes or an error code if the RVA and size is not contained completely within a valid section.
Error getHintName (uint32_t Rva, uint16_t &Hint, StringRef &Name) const
Error getDebugPDBInfo (const debug_directory *DebugDir, const codeview::DebugInfo *&Info, StringRef &PDBFileName) const
 Get PDB information out of a codeview debug directory entry.
Error getDebugPDBInfo (const codeview::DebugInfo *&Info, StringRef &PDBFileName) const
 Get PDB information from an executable.
bool isRelocatableObject () const override
 True if this is a relocatable object (.o/.obj).
bool is64 () const
StringRef mapDebugSectionName (StringRef Name) const override
 Maps a debug section name to a standard DWARF section name.
Public Member Functions inherited from llvm::object::ObjectFile
 ObjectFile ()=delete
 ObjectFile (const ObjectFile &other)=delete
ObjectFileoperator= (const ObjectFile &other)=delete
uint64_t getCommonSymbolSize (DataRefImpl Symb) const
virtual std::vector< SectionRefdynamic_relocation_sections () const
symbol_iterator_range symbols () const
section_iterator_range sections () const
virtual bool hasDebugInfo () const
virtual Triple::OSType getOS () const
virtual std::optional< StringReftryGetCPUName () const
virtual void setARMSubArch (Triple &TheTriple) const
Triple makeTriple () const
 Create a triple from the data in this object file.
bool isReflectionSectionStrippable (llvm::binaryformat::Swift5ReflectionSectionKind ReflectionSectionKind) const
 True if the reflection section can be stripped by the linker.
Public Member Functions inherited from llvm::object::SymbolicFile
 SymbolicFile (unsigned int Type, MemoryBufferRef Source)
 ~SymbolicFile () override
basic_symbol_iterator_range symbols () const
Public Member Functions inherited from llvm::object::Binary
 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
bool isDXContainer () const
Triple::ObjectFormatType getTripleObjectFormat () const

Static Public Member Functions

static Expected< std::unique_ptr< COFFObjectFile > > create (MemoryBufferRef Object)
static bool classof (const Binary *v)
Static Public Member Functions inherited from llvm::object::ObjectFile
static Expected< OwningBinary< ObjectFile > > createObjectFile (StringRef ObjectPath)
static Expected< std::unique_ptr< ObjectFile > > createObjectFile (MemoryBufferRef Object, llvm::file_magic Type, bool InitContent=true)
static Expected< std::unique_ptr< ObjectFile > > createObjectFile (MemoryBufferRef Object)
static bool classof (const Binary *v)
static Expected< std::unique_ptr< COFFObjectFile > > createCOFFObjectFile (MemoryBufferRef Object)
static Expected< std::unique_ptr< ObjectFile > > createXCOFFObjectFile (MemoryBufferRef Object, unsigned FileType)
static Expected< std::unique_ptr< ObjectFile > > createELFObjectFile (MemoryBufferRef Object, bool InitContent=true)
static Expected< std::unique_ptr< MachOObjectFile > > createMachOObjectFile (MemoryBufferRef Object, uint32_t UniversalCputype=0, uint32_t UniversalIndex=0, size_t MachOFilesetEntryOffset=0)
 Create a MachOObjectFile instance from a given buffer.
static Expected< std::unique_ptr< ObjectFile > > createGOFFObjectFile (MemoryBufferRef Object)
static Expected< std::unique_ptr< WasmObjectFile > > createWasmObjectFile (MemoryBufferRef Object)
static Expected< std::unique_ptr< DXContainerObjectFile > > createDXContainerObjectFile (MemoryBufferRef Object)
Static Public Member Functions inherited from llvm::object::SymbolicFile
static Expected< std::unique_ptr< SymbolicFile > > createSymbolicFile (MemoryBufferRef Object, llvm::file_magic Type, LLVMContext *Context, bool InitContent=true)
static Expected< std::unique_ptr< SymbolicFile > > createSymbolicFile (MemoryBufferRef Object)
static bool classof (const Binary *v)
static bool isSymbolicFile (file_magic Type, const LLVMContext *Context)
Static Public Member Functions inherited from llvm::object::Binary
static Error checkOffset (MemoryBufferRef M, uintptr_t Addr, const uint64_t Size)

Protected Member Functions

void getRelocationTypeName (DataRefImpl Rel, SmallVectorImpl< char > &Result) const override
void moveSymbolNext (DataRefImpl &Symb) const override
Expected< StringRefgetSymbolName (DataRefImpl Symb) const override
Expected< uint64_tgetSymbolAddress (DataRefImpl Symb) const override
uint32_t getSymbolAlignment (DataRefImpl Symb) const override
uint64_t getSymbolValueImpl (DataRefImpl Symb) const override
uint64_t getCommonSymbolSizeImpl (DataRefImpl Symb) const override
Expected< uint32_tgetSymbolFlags (DataRefImpl Symb) const override
Expected< SymbolRef::TypegetSymbolType (DataRefImpl Symb) const override
Expected< section_iteratorgetSymbolSection (DataRefImpl Symb) const override
void moveSectionNext (DataRefImpl &Sec) const override
Expected< StringRefgetSectionName (DataRefImpl Sec) const override
uint64_t getSectionAddress (DataRefImpl Sec) const override
uint64_t getSectionIndex (DataRefImpl Sec) const override
uint64_t getSectionSize (DataRefImpl Sec) const override
Expected< ArrayRef< uint8_t > > getSectionContents (DataRefImpl Sec) const override
uint64_t getSectionAlignment (DataRefImpl Sec) const override
bool isSectionCompressed (DataRefImpl Sec) const override
bool isSectionText (DataRefImpl Sec) const override
bool isSectionData (DataRefImpl Sec) const override
bool isSectionBSS (DataRefImpl Sec) const override
bool isSectionVirtual (DataRefImpl Sec) const override
bool isDebugSection (DataRefImpl Sec) const override
relocation_iterator section_rel_begin (DataRefImpl Sec) const override
relocation_iterator section_rel_end (DataRefImpl Sec) const override
void moveRelocationNext (DataRefImpl &Rel) const override
uint64_t getRelocationOffset (DataRefImpl Rel) const override
symbol_iterator getRelocationSymbol (DataRefImpl Rel) const override
uint64_t getRelocationType (DataRefImpl Rel) const override
Protected Member Functions inherited from llvm::object::ObjectFile
 ObjectFile (unsigned int Type, MemoryBufferRef Source)
const uint8_tbase () const
Error printSymbolName (raw_ostream &OS, DataRefImpl Symb) const override
virtual bool isSectionBitcode (DataRefImpl Sec) const
virtual bool isSectionStripped (DataRefImpl Sec) const
virtual bool isBerkeleyText (DataRefImpl Sec) const
virtual bool isBerkeleyData (DataRefImpl Sec) const
virtual Expected< section_iteratorgetRelocatedSection (DataRefImpl Sec) const
virtual llvm::binaryformat::Swift5ReflectionSectionKind mapReflectionSectionNameToEnumValue (StringRef SectionName) const
Expected< uint64_tgetSymbolValue (DataRefImpl Symb) const
Protected Member Functions inherited from llvm::object::Binary
 Binary (unsigned int Type, MemoryBufferRef Source)

Friends

class ImportDirectoryEntryRef
class ExportDirectoryEntryRef

Additional Inherited Members

Public Types inherited from llvm::object::ObjectFile
using symbol_iterator_range = iterator_range<symbol_iterator>
using section_iterator_range = iterator_range<section_iterator>
Public Types inherited from llvm::object::SymbolicFile
using basic_symbol_iterator_range = iterator_range<basic_symbol_iterator>
Protected Types inherited from llvm::object::Binary
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_DXContainer ,
  ID_EndObjects
}
Static Protected Member Functions inherited from llvm::object::Binary
static unsigned int getELFType (bool isLE, bool is64Bits)
static unsigned int getMachOType (bool isLE, bool is64Bits)
Protected Attributes inherited from llvm::object::Binary
MemoryBufferRef Data

Detailed Description

Definition at line 880 of file COFF.h.

Member Function Documentation

◆ base_reloc_begin()

base_reloc_iterator COFFObjectFile::base_reloc_begin ( ) const

Definition at line 1096 of file COFFObjectFile.cpp.

◆ base_reloc_end()

base_reloc_iterator COFFObjectFile::base_reloc_end ( ) const

Definition at line 1100 of file COFFObjectFile.cpp.

◆ base_relocs()

iterator_range< base_reloc_iterator > COFFObjectFile::base_relocs ( ) const

Definition at line 1168 of file COFFObjectFile.cpp.

◆ classof()

bool llvm::object::COFFObjectFile::classof ( const Binary * v)
inlinestatic

Definition at line 1227 of file COFF.h.

◆ create()

Expected< std::unique_ptr< COFFObjectFile > > COFFObjectFile::create ( MemoryBufferRef Object)
static

Definition at line 861 of file COFFObjectFile.cpp.

◆ debug_directories()

iterator_range< const debug_directory * > llvm::object::COFFObjectFile::debug_directories ( ) const
inline

Definition at line 1127 of file COFF.h.

◆ debug_directory_begin()

const debug_directory * llvm::object::COFFObjectFile::debug_directory_begin ( ) const
inline

Definition at line 1114 of file COFF.h.

◆ debug_directory_end()

const debug_directory * llvm::object::COFFObjectFile::debug_directory_end ( ) const
inline

Definition at line 1117 of file COFF.h.

◆ delay_import_directories()

iterator_range< delay_import_directory_iterator > COFFObjectFile::delay_import_directories ( ) const

Definition at line 1158 of file COFFObjectFile.cpp.

◆ delay_import_directory_begin()

delay_import_directory_iterator COFFObjectFile::delay_import_directory_begin ( ) const

Definition at line 1057 of file COFFObjectFile.cpp.

◆ delay_import_directory_end()

delay_import_directory_iterator COFFObjectFile::delay_import_directory_end ( ) const

Definition at line 1063 of file COFFObjectFile.cpp.

◆ dynamic_reloc_begin()

dynamic_reloc_iterator COFFObjectFile::dynamic_reloc_begin ( ) const

Definition at line 1104 of file COFFObjectFile.cpp.

◆ dynamic_reloc_end()

dynamic_reloc_iterator COFFObjectFile::dynamic_reloc_end ( ) const

Definition at line 1109 of file COFFObjectFile.cpp.

◆ dynamic_relocs()

iterator_range< dynamic_reloc_iterator > COFFObjectFile::dynamic_relocs ( ) const

Definition at line 1172 of file COFFObjectFile.cpp.

◆ export_directories()

iterator_range< export_directory_iterator > COFFObjectFile::export_directories ( ) const

Definition at line 1164 of file COFFObjectFile.cpp.

◆ export_directory_begin()

export_directory_iterator COFFObjectFile::export_directory_begin ( ) const

Definition at line 1069 of file COFFObjectFile.cpp.

◆ export_directory_end()

export_directory_iterator COFFObjectFile::export_directory_end ( ) const

Definition at line 1074 of file COFFObjectFile.cpp.

◆ getArch()

Triple::ArchType COFFObjectFile::getArch ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 1142 of file COFFObjectFile.cpp.

◆ getAuxSymbol()

template<typename T>
Error llvm::object::COFFObjectFile::getAuxSymbol ( uint32_t index,
const T *& Res ) const
inline

Definition at line 1165 of file COFF.h.

◆ getBytesInAddress()

uint8_t COFFObjectFile::getBytesInAddress ( ) const
overridevirtual

The number of bytes used to represent an address in this object file format.

Implements llvm::object::ObjectFile.

Definition at line 1117 of file COFFObjectFile.cpp.

◆ getCharacteristics()

uint16_t llvm::object::COFFObjectFile::getCharacteristics ( ) const
inline

Definition at line 974 of file COFF.h.

◆ getCHPEMetadata()

const chpe_metadata * llvm::object::COFFObjectFile::getCHPEMetadata ( ) const
inline

Definition at line 1039 of file COFF.h.

◆ getCOFFBigObjHeader()

const coff_bigobj_file_header * llvm::object::COFFObjectFile::getCOFFBigObjHeader ( ) const
inline

Definition at line 1145 of file COFF.h.

◆ getCOFFHeader()

const coff_file_header * llvm::object::COFFObjectFile::getCOFFHeader ( ) const
inline

Definition at line 1144 of file COFF.h.

◆ getCOFFRelocation()

const coff_relocation * COFFObjectFile::getCOFFRelocation ( const RelocationRef & Reloc) const

Definition at line 1367 of file COFFObjectFile.cpp.

◆ getCOFFSection()

const coff_section * COFFObjectFile::getCOFFSection ( const SectionRef & Section) const

Definition at line 1350 of file COFFObjectFile.cpp.

◆ getCOFFSymbol() [1/2]

COFFSymbolRef COFFObjectFile::getCOFFSymbol ( const DataRefImpl & Ref) const

Definition at line 1354 of file COFFObjectFile.cpp.

◆ getCOFFSymbol() [2/2]

COFFSymbolRef COFFObjectFile::getCOFFSymbol ( const SymbolRef & Symbol) const

Definition at line 1362 of file COFFObjectFile.cpp.

◆ getCommonSymbolSizeImpl()

uint64_t COFFObjectFile::getCommonSymbolSizeImpl ( DataRefImpl Symb) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 240 of file COFFObjectFile.cpp.

◆ getDataDirectory()

const data_directory * COFFObjectFile::getDataDirectory ( uint32_t index) const

Definition at line 1176 of file COFFObjectFile.cpp.

◆ getDebugPDBInfo() [1/2]

Error COFFObjectFile::getDebugPDBInfo ( const codeview::DebugInfo *& Info,
StringRef & PDBFileName ) const

Get PDB information from an executable.

If the information is not present, Info will be set to nullptr and PDBFileName will be empty. An error is returned only on corrupt object files. Convenience accessor that can be used if the debug directory is not already handy.

Definition at line 564 of file COFFObjectFile.cpp.

◆ getDebugPDBInfo() [2/2]

Error COFFObjectFile::getDebugPDBInfo ( const debug_directory * DebugDir,
const codeview::DebugInfo *& Info,
StringRef & PDBFileName ) const

Get PDB information out of a codeview debug directory entry.

Definition at line 545 of file COFFObjectFile.cpp.

◆ getDOSHeader()

const dos_header * llvm::object::COFFObjectFile::getDOSHeader ( ) const
inline

Definition at line 1138 of file COFF.h.

◆ getDynamicRelocTable()

const coff_dynamic_reloc_table * llvm::object::COFFObjectFile::getDynamicRelocTable ( ) const
inline

Definition at line 1040 of file COFF.h.

◆ getExportTable()

const export_directory_table_entry * llvm::object::COFFObjectFile::getExportTable ( ) const
inline

Definition at line 1025 of file COFF.h.

◆ getFeatures()

Expected< SubtargetFeatures > llvm::object::COFFObjectFile::getFeatures ( ) const
inlineoverridevirtual

Implements llvm::object::ObjectFile.

Definition at line 1099 of file COFF.h.

◆ getFileFormatName()

StringRef COFFObjectFile::getFileFormatName ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 1121 of file COFFObjectFile.cpp.

◆ getHintName()

Error COFFObjectFile::getHintName ( uint32_t Rva,
uint16_t & Hint,
StringRef & Name ) const

Definition at line 534 of file COFFObjectFile.cpp.

◆ getHybridObjectView()

std::unique_ptr< MemoryBuffer > COFFObjectFile::getHybridObjectView ( ) const

Definition at line 1515 of file COFFObjectFile.cpp.

◆ getImageBase()

uint64_t COFFObjectFile::getImageBase ( ) const

Definition at line 454 of file COFFObjectFile.cpp.

◆ getLoadConfig32()

const coff_load_configuration32 * llvm::object::COFFObjectFile::getLoadConfig32 ( ) const
inline

Definition at line 1029 of file COFF.h.

◆ getLoadConfig64()

const coff_load_configuration64 * llvm::object::COFFObjectFile::getLoadConfig64 ( ) const
inline

Definition at line 1034 of file COFF.h.

◆ getMachine()

uint16_t llvm::object::COFFObjectFile::getMachine ( ) const
inline

Definition at line 947 of file COFF.h.

◆ getNumberOfSections()

uint32_t llvm::object::COFFObjectFile::getNumberOfSections ( ) const
inline

Definition at line 992 of file COFF.h.

◆ getNumberOfSymbols()

uint32_t llvm::object::COFFObjectFile::getNumberOfSymbols ( ) const
inline

Definition at line 1017 of file COFF.h.

◆ getPE32Header()

const pe32_header * llvm::object::COFFObjectFile::getPE32Header ( ) const
inline

Definition at line 1148 of file COFF.h.

◆ getPE32PlusHeader()

const pe32plus_header * llvm::object::COFFObjectFile::getPE32PlusHeader ( ) const
inline

Definition at line 1149 of file COFF.h.

◆ getPointerToSymbolTable()

uint32_t llvm::object::COFFObjectFile::getPointerToSymbolTable ( ) const
inline

Definition at line 1000 of file COFF.h.

◆ getRawNumberOfSymbols()

uint32_t llvm::object::COFFObjectFile::getRawNumberOfSymbols ( ) const
inline

Definition at line 1009 of file COFF.h.

◆ getRelocationOffset()

uint64_t COFFObjectFile::getRelocationOffset ( DataRefImpl Rel) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 1325 of file COFFObjectFile.cpp.

◆ getRelocations()

ArrayRef< coff_relocation > COFFObjectFile::getRelocations ( const coff_section * Sec) const

Definition at line 1372 of file COFFObjectFile.cpp.

◆ getRelocationSymbol()

symbol_iterator COFFObjectFile::getRelocationSymbol ( DataRefImpl Rel) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 1330 of file COFFObjectFile.cpp.

◆ getRelocationType()

uint64_t COFFObjectFile::getRelocationType ( DataRefImpl Rel) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 1344 of file COFFObjectFile.cpp.

◆ getRelocationTypeName() [1/2]

void COFFObjectFile::getRelocationTypeName ( DataRefImpl Rel,
SmallVectorImpl< char > & Result ) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 1498 of file COFFObjectFile.cpp.

◆ getRelocationTypeName() [2/2]

StringRef COFFObjectFile::getRelocationTypeName ( uint16_t Type) const

Definition at line 1381 of file COFFObjectFile.cpp.

◆ getRvaAndSizeAsBytes()

Error COFFObjectFile::getRvaAndSizeAsBytes ( uint32_t RVA,
uint32_t Size,
ArrayRef< uint8_t > & Contents,
const char * ErrorContext = nullptr ) const

Given an RVA base and size, returns a valid array of bytes or an error code if the RVA and size is not contained completely within a valid section.

Definition at line 506 of file COFFObjectFile.cpp.

◆ getRvaPtr()

Error COFFObjectFile::getRvaPtr ( uint32_t Rva,
uintptr_t & Res,
const char * ErrorContext = nullptr ) const

Definition at line 472 of file COFFObjectFile.cpp.

◆ getSection()

Expected< const coff_section * > COFFObjectFile::getSection ( int32_t index) const

Definition at line 1187 of file COFFObjectFile.cpp.

◆ getSectionAddress()

uint64_t COFFObjectFile::getSectionAddress ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 274 of file COFFObjectFile.cpp.

◆ getSectionAlignment()

uint64_t COFFObjectFile::getSectionAlignment ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 301 of file COFFObjectFile.cpp.

◆ getSectionContents() [1/2]

Error COFFObjectFile::getSectionContents ( const coff_section * Sec,
ArrayRef< uint8_t > & Res ) const

Definition at line 1298 of file COFFObjectFile.cpp.

◆ getSectionContents() [2/2]

Expected< ArrayRef< uint8_t > > COFFObjectFile::getSectionContents ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 293 of file COFFObjectFile.cpp.

◆ getSectionID()

unsigned COFFObjectFile::getSectionID ( SectionRef Sec) const

Definition at line 341 of file COFFObjectFile.cpp.

◆ getSectionIndex()

uint64_t COFFObjectFile::getSectionIndex ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 284 of file COFFObjectFile.cpp.

◆ getSectionName() [1/2]

Expected< StringRef > COFFObjectFile::getSectionName ( const coff_section * Sec) const

Definition at line 1261 of file COFFObjectFile.cpp.

◆ getSectionName() [2/2]

Expected< StringRef > COFFObjectFile::getSectionName ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 269 of file COFFObjectFile.cpp.

◆ getSectionSize() [1/2]

uint64_t COFFObjectFile::getSectionSize ( const coff_section * Sec) const

Definition at line 1282 of file COFFObjectFile.cpp.

◆ getSectionSize() [2/2]

uint64_t COFFObjectFile::getSectionSize ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 288 of file COFFObjectFile.cpp.

◆ getSizeOfOptionalHeader()

uint16_t llvm::object::COFFObjectFile::getSizeOfOptionalHeader ( ) const
inline

Definition at line 964 of file COFF.h.

◆ getStartAddress()

Expected< uint64_t > COFFObjectFile::getStartAddress ( ) const
overridevirtual

Reimplemented from llvm::object::ObjectFile.

Definition at line 1146 of file COFFObjectFile.cpp.

◆ getStringTable()

StringRef llvm::object::COFFObjectFile::getStringTable ( ) const
inline

Definition at line 943 of file COFF.h.

◆ getStringTableSize()

uint32_t llvm::object::COFFObjectFile::getStringTableSize ( ) const
inline

Definition at line 1023 of file COFF.h.

◆ getSymbol()

Expected< COFFSymbolRef > llvm::object::COFFObjectFile::getSymbol ( uint32_t index) const
inline

Definition at line 1154 of file COFF.h.

◆ getSymbolAddress()

Expected< uint64_t > COFFObjectFile::getSymbolAddress ( DataRefImpl Symb) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 165 of file COFFObjectFile.cpp.

◆ getSymbolAlignment()

uint32_t COFFObjectFile::getSymbolAlignment ( DataRefImpl Symb) const
overrideprotectedvirtual

Reimplemented from llvm::object::ObjectFile.

Definition at line 158 of file COFFObjectFile.cpp.

◆ getSymbolAuxData()

ArrayRef< uint8_t > COFFObjectFile::getSymbolAuxData ( COFFSymbolRef Symbol) const

Definition at line 1228 of file COFFObjectFile.cpp.

◆ getSymbolFlags()

Expected< uint32_t > COFFObjectFile::getSymbolFlags ( DataRefImpl Symb) const
overrideprotectedvirtual

Implements llvm::object::SymbolicFile.

Definition at line 209 of file COFFObjectFile.cpp.

◆ getSymbolIndex()

uint32_t COFFObjectFile::getSymbolIndex ( COFFSymbolRef Symbol) const

Definition at line 1250 of file COFFObjectFile.cpp.

◆ getSymbolName() [1/3]

Expected< StringRef > COFFObjectFile::getSymbolName ( COFFSymbolRef Symbol) const

Definition at line 1209 of file COFFObjectFile.cpp.

◆ getSymbolName() [2/3]

Expected< StringRef > COFFObjectFile::getSymbolName ( const coff_symbol_generic * Symbol) const

Definition at line 1214 of file COFFObjectFile.cpp.

◆ getSymbolName() [3/3]

Expected< StringRef > COFFObjectFile::getSymbolName ( DataRefImpl Symb) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 150 of file COFFObjectFile.cpp.

◆ getSymbolSection()

Expected< section_iterator > COFFObjectFile::getSymbolSection ( DataRefImpl Symb) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 246 of file COFFObjectFile.cpp.

◆ getSymbolSectionID()

unsigned COFFObjectFile::getSymbolSectionID ( SymbolRef Sym) const

Definition at line 258 of file COFFObjectFile.cpp.

◆ getSymbolTable()

uintptr_t llvm::object::COFFObjectFile::getSymbolTable ( ) const
inline

Definition at line 935 of file COFF.h.

◆ getSymbolTableEntrySize()

size_t llvm::object::COFFObjectFile::getSymbolTableEntrySize ( ) const
inline

Definition at line 1180 of file COFF.h.

◆ getSymbolType()

Expected< SymbolRef::Type > COFFObjectFile::getSymbolType ( DataRefImpl Symb) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 186 of file COFFObjectFile.cpp.

◆ getSymbolValueImpl()

uint64_t COFFObjectFile::getSymbolValueImpl ( DataRefImpl Symb) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 154 of file COFFObjectFile.cpp.

◆ getTimeDateStamp()

uint32_t llvm::object::COFFObjectFile::getTimeDateStamp ( ) const
inline

Definition at line 984 of file COFF.h.

◆ getTLSDirectory32()

const coff_tls_directory32 * llvm::object::COFFObjectFile::getTLSDirectory32 ( ) const
inline

Definition at line 1131 of file COFF.h.

◆ getTLSDirectory64()

const coff_tls_directory64 * llvm::object::COFFObjectFile::getTLSDirectory64 ( ) const
inline

Definition at line 1134 of file COFF.h.

◆ getVaPtr()

Error COFFObjectFile::getVaPtr ( uint64_t VA,
uintptr_t & Res ) const

Definition at line 464 of file COFFObjectFile.cpp.

◆ import_directories()

iterator_range< import_directory_iterator > COFFObjectFile::import_directories ( ) const

Definition at line 1153 of file COFFObjectFile.cpp.

◆ import_directory_begin()

import_directory_iterator COFFObjectFile::import_directory_begin ( ) const

Definition at line 1042 of file COFFObjectFile.cpp.

◆ import_directory_end()

import_directory_iterator COFFObjectFile::import_directory_end ( ) const

Definition at line 1051 of file COFFObjectFile.cpp.

◆ is64()

bool llvm::object::COFFObjectFile::is64 ( ) const
inline

Definition at line 1223 of file COFF.h.

◆ is64Bit()

bool llvm::object::COFFObjectFile::is64Bit ( ) const
inlineoverridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 1086 of file COFF.h.

◆ isDebugSection()

bool COFFObjectFile::isDebugSection ( DataRefImpl Sec) const
overrideprotectedvirtual

Reimplemented from llvm::object::ObjectFile.

Definition at line 330 of file COFFObjectFile.cpp.

◆ isRelocatableObject()

bool COFFObjectFile::isRelocatableObject ( ) const
overridevirtual

True if this is a relocatable object (.o/.obj).

Implements llvm::object::ObjectFile.

Definition at line 1505 of file COFFObjectFile.cpp.

◆ isSectionBSS()

bool COFFObjectFile::isSectionBSS ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 320 of file COFFObjectFile.cpp.

◆ isSectionCompressed()

bool COFFObjectFile::isSectionCompressed ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 306 of file COFFObjectFile.cpp.

◆ isSectionData()

bool COFFObjectFile::isSectionData ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 315 of file COFFObjectFile.cpp.

◆ isSectionText()

bool COFFObjectFile::isSectionText ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 310 of file COFFObjectFile.cpp.

◆ isSectionVirtual()

bool COFFObjectFile::isSectionVirtual ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 348 of file COFFObjectFile.cpp.

◆ mapDebugSectionName()

StringRef COFFObjectFile::mapDebugSectionName ( StringRef Name) const
overridevirtual

Maps a debug section name to a standard DWARF section name.

Reimplemented from llvm::object::ObjectFile.

Definition at line 1509 of file COFFObjectFile.cpp.

◆ moveRelocationNext()

void COFFObjectFile::moveRelocationNext ( DataRefImpl & Rel) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 1320 of file COFFObjectFile.cpp.

◆ moveSectionNext()

void COFFObjectFile::moveSectionNext ( DataRefImpl & Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 263 of file COFFObjectFile.cpp.

◆ moveSymbolNext()

void COFFObjectFile::moveSymbolNext ( DataRefImpl & Symb) const
overrideprotectedvirtual

Implements llvm::object::SymbolicFile.

Definition at line 135 of file COFFObjectFile.cpp.

◆ section_begin()

section_iterator COFFObjectFile::section_begin ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 1082 of file COFFObjectFile.cpp.

◆ section_end()

section_iterator COFFObjectFile::section_end ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 1088 of file COFFObjectFile.cpp.

◆ section_rel_begin()

relocation_iterator COFFObjectFile::section_rel_begin ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 395 of file COFFObjectFile.cpp.

◆ section_rel_end()

relocation_iterator COFFObjectFile::section_rel_end ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 405 of file COFFObjectFile.cpp.

◆ symbol_begin()

basic_symbol_iterator COFFObjectFile::symbol_begin ( ) const
overridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 1029 of file COFFObjectFile.cpp.

◆ symbol_end()

basic_symbol_iterator COFFObjectFile::symbol_end ( ) const
overridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 1035 of file COFFObjectFile.cpp.

◆ ExportDirectoryEntryRef

friend class ExportDirectoryEntryRef
friend

Definition at line 885 of file COFF.h.

◆ ImportDirectoryEntryRef

friend class ImportDirectoryEntryRef
friend

Definition at line 884 of file COFF.h.


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