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

#include "llvm/Object/XCOFFObjectFile.h"

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

Public Types

using xcoff_symbol_iterator_range = iterator_range< xcoff_symbol_iterator >
 
- 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 >
 

Public Member Functions

void moveSymbolNext (DataRefImpl &Symb) const override
 
Expected< uint32_tgetSymbolFlags (DataRefImpl Symb) const override
 
basic_symbol_iterator symbol_begin () const override
 
basic_symbol_iterator symbol_end () const override
 
xcoff_symbol_iterator_range symbols () const
 
bool is64Bit () const override
 
Expected< StringRefgetSymbolName (DataRefImpl Symb) const override
 
Expected< uint64_tgetSymbolAddress (DataRefImpl Symb) const override
 
uint64_t getSymbolValueImpl (DataRefImpl Symb) const override
 
uint32_t getSymbolAlignment (DataRefImpl Symb) const override
 
uint64_t getCommonSymbolSizeImpl (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 isDebugSection (DataRefImpl Sec) const override
 
bool isSectionVirtual (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
 
void getRelocationTypeName (DataRefImpl Rel, SmallVectorImpl< char > &Result) const override
 
section_iterator section_begin () const override
 
section_iterator section_end () const override
 
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< SubtargetFeaturesgetFeatures () const override
 
Expected< uint64_tgetStartAddress () const override
 
StringRef mapDebugSectionName (StringRef Name) const override
 Maps a debug section name to a standard DWARF section name.
 
bool isRelocatableObject () const override
 True if this is a relocatable object (.o/.obj).
 
Expected< StringRefgetRawData (const char *Start, uint64_t Size, StringRef Name) const
 
const XCOFFAuxiliaryHeader32auxiliaryHeader32 () const
 
const XCOFFAuxiliaryHeader64auxiliaryHeader64 () const
 
const void * getPointerToSymbolTable () const
 
Expected< StringRefgetSymbolSectionName (XCOFFSymbolRef Ref) const
 
unsigned getSymbolSectionID (SymbolRef Sym) const
 
XCOFFSymbolRef toSymbolRef (DataRefImpl Ref) const
 
const XCOFFFileHeader32fileHeader32 () const
 
const XCOFFFileHeader64fileHeader64 () const
 
uint16_t getMagic () const
 
uint16_t getNumberOfSections () const
 
int32_t getTimeStamp () const
 
uint32_t getSymbolTableOffset32 () const
 
uint64_t getSymbolTableOffset64 () const
 
int32_t getRawNumberOfSymbolTableEntries32 () const
 
uint32_t getLogicalNumberOfSymbolTableEntries32 () const
 
uint32_t getNumberOfSymbolTableEntries64 () const
 
uint32_t getNumberOfSymbolTableEntries () const
 
uint32_t getSymbolIndex (uintptr_t SymEntPtr) const
 
uint64_t getSymbolSize (DataRefImpl Symb) const
 
uintptr_t getSymbolByIndex (uint32_t Idx) const
 
uintptr_t getSymbolEntryAddressByIndex (uint32_t SymbolTableIndex) const
 
Expected< StringRefgetSymbolNameByIndex (uint32_t SymbolTableIndex) const
 
Expected< StringRefgetCFileName (const XCOFFFileAuxEnt *CFileEntPtr) const
 
uint16_t getOptionalHeaderSize () const
 
uint16_t getFlags () const
 
ArrayRef< XCOFFSectionHeader32sections32 () const
 
ArrayRef< XCOFFSectionHeader64sections64 () const
 
int32_t getSectionFlags (DataRefImpl Sec) const
 
Expected< DataRefImplgetSectionByNum (int16_t Num) const
 
Expected< uintptr_t > getSectionFileOffsetToRawData (XCOFF::SectionTypeFlags SectType) const
 
void checkSymbolEntryPointer (uintptr_t SymbolEntPtr) const
 
template<typename T >
Expected< uint32_tgetNumberOfRelocationEntries (const XCOFFSectionHeader< T > &Sec) const
 
template<typename Shdr , typename Reloc >
Expected< ArrayRef< Reloc > > relocations (const Shdr &Sec) const
 
Expected< StringRefgetImportFileTable () const
 
template<typename ExceptEnt >
Expected< ArrayRef< ExceptEnt > > getExceptionEntries () const
 
Expected< StringRefgetStringTableEntry (uint32_t Offset) const
 
StringRef getStringTable () const
 
const XCOFF::SymbolAuxTypegetSymbolAuxType (uintptr_t AuxEntryAddress) const
 
std::optional< StringReftryGetCPUName () const override
 
- 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
 
virtual section_iterator section_begin () const =0
 
virtual section_iterator section_end () const =0
 
section_iterator_range sections () const
 
virtual bool hasDebugInfo () const
 
virtual uint8_t getBytesInAddress () const =0
 The number of bytes used to represent an address in this object file format.
 
virtual StringRef getFileFormatName () const =0
 
virtual Triple::ArchType getArch () const =0
 
virtual Triple::OSType getOS () const
 
virtual Expected< SubtargetFeaturesgetFeatures () const =0
 
virtual std::optional< StringReftryGetCPUName () const
 
virtual void setARMSubArch (Triple &TheTriple) const
 
virtual Expected< uint64_tgetStartAddress () const
 
Triple makeTriple () const
 Create a triple from the data in this object file.
 
virtual StringRef mapDebugSectionName (StringRef Name) const
 Maps a debug section name to a standard DWARF section name.
 
virtual bool isRelocatableObject () const =0
 True if this is a relocatable object (.o/.obj).
 
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
 
virtual void moveSymbolNext (DataRefImpl &Symb) const =0
 
virtual Error printSymbolName (raw_ostream &OS, DataRefImpl Symb) const =0
 
virtual Expected< uint32_tgetSymbolFlags (DataRefImpl Symb) const =0
 
virtual basic_symbol_iterator symbol_begin () const =0
 
virtual basic_symbol_iterator symbol_end () const =0
 
virtual bool is64Bit () const =0
 
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
 
Triple::ObjectFormatType getTripleObjectFormat () const
 

Static Public Member Functions

static uintptr_t getAdvancedSymbolEntryAddress (uintptr_t CurrentAddress, uint32_t Distance)
 
static bool classof (const Binary *B)
 
- 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 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)
 

Static Public Attributes

static constexpr uint64_t InvalidRelocOffset
 

Friends

Expected< std::unique_ptr< ObjectFile > > ObjectFile::createXCOFFObjectFile (MemoryBufferRef Object, unsigned FileType)
 

Additional Inherited Members

- 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_EndObjects
}
 
- Protected Member Functions inherited from llvm::object::ObjectFile
 ObjectFile (unsigned int Type, MemoryBufferRef Source)
 
const uint8_t * base () const
 
virtual Expected< StringRefgetSymbolName (DataRefImpl Symb) const =0
 
Error printSymbolName (raw_ostream &OS, DataRefImpl Symb) const override
 
virtual Expected< uint64_tgetSymbolAddress (DataRefImpl Symb) const =0
 
virtual uint64_t getSymbolValueImpl (DataRefImpl Symb) const =0
 
virtual uint32_t getSymbolAlignment (DataRefImpl Symb) const
 
virtual uint64_t getCommonSymbolSizeImpl (DataRefImpl Symb) const =0
 
virtual Expected< SymbolRef::TypegetSymbolType (DataRefImpl Symb) const =0
 
virtual Expected< section_iteratorgetSymbolSection (DataRefImpl Symb) const =0
 
virtual void moveSectionNext (DataRefImpl &Sec) const =0
 
virtual Expected< StringRefgetSectionName (DataRefImpl Sec) const =0
 
virtual uint64_t getSectionAddress (DataRefImpl Sec) const =0
 
virtual uint64_t getSectionIndex (DataRefImpl Sec) const =0
 
virtual uint64_t getSectionSize (DataRefImpl Sec) const =0
 
virtual Expected< ArrayRef< uint8_t > > getSectionContents (DataRefImpl Sec) const =0
 
virtual uint64_t getSectionAlignment (DataRefImpl Sec) const =0
 
virtual bool isSectionCompressed (DataRefImpl Sec) const =0
 
virtual bool isSectionText (DataRefImpl Sec) const =0
 
virtual bool isSectionData (DataRefImpl Sec) const =0
 
virtual bool isSectionBSS (DataRefImpl Sec) const =0
 
virtual bool isSectionVirtual (DataRefImpl Sec) const =0
 
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 bool isDebugSection (DataRefImpl Sec) const
 
virtual relocation_iterator section_rel_begin (DataRefImpl Sec) const =0
 
virtual relocation_iterator section_rel_end (DataRefImpl Sec) const =0
 
virtual Expected< section_iteratorgetRelocatedSection (DataRefImpl Sec) const
 
virtual void moveRelocationNext (DataRefImpl &Rel) const =0
 
virtual uint64_t getRelocationOffset (DataRefImpl Rel) const =0
 
virtual symbol_iterator getRelocationSymbol (DataRefImpl Rel) const =0
 
virtual uint64_t getRelocationType (DataRefImpl Rel) const =0
 
virtual void getRelocationTypeName (DataRefImpl Rel, SmallVectorImpl< char > &Result) const =0
 
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)
 
- 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 531 of file XCOFFObjectFile.h.

Member Typedef Documentation

◆ xcoff_symbol_iterator_range

Definition at line 590 of file XCOFFObjectFile.h.

Member Function Documentation

◆ auxiliaryHeader32()

const XCOFFAuxiliaryHeader32 * llvm::object::XCOFFObjectFile::auxiliaryHeader32 ( ) const

◆ auxiliaryHeader64()

const XCOFFAuxiliaryHeader64 * llvm::object::XCOFFObjectFile::auxiliaryHeader64 ( ) const

Definition at line 194 of file XCOFFObjectFile.cpp.

References assert(), and is64Bit().

Referenced by getMemberAlignment(), and getStartAddress().

◆ checkSymbolEntryPointer()

void llvm::object::XCOFFObjectFile::checkSymbolEntryPointer ( uintptr_t  SymbolEntPtr) const

◆ classof()

static bool llvm::object::XCOFFObjectFile::classof ( const Binary B)
inlinestatic

Definition at line 731 of file XCOFFObjectFile.h.

References B.

◆ fileHeader32()

const XCOFFFileHeader32 * llvm::object::XCOFFObjectFile::fileHeader32 ( ) const

◆ fileHeader64()

const XCOFFFileHeader64 * llvm::object::XCOFFObjectFile::fileHeader64 ( ) const

◆ getAdvancedSymbolEntryAddress()

uintptr_t llvm::object::XCOFFObjectFile::getAdvancedSymbolEntryAddress ( uintptr_t  CurrentAddress,
uint32_t  Distance 
)
static

◆ getArch()

Triple::ArchType llvm::object::XCOFFObjectFile::getArch ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 725 of file XCOFFObjectFile.cpp.

References is64Bit(), llvm::Triple::ppc, and llvm::Triple::ppc64.

◆ getBytesInAddress()

uint8_t llvm::object::XCOFFObjectFile::getBytesInAddress ( ) const
overridevirtual

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

Implements llvm::object::ObjectFile.

Definition at line 719 of file XCOFFObjectFile.cpp.

References is64Bit().

◆ getCFileName()

Expected< StringRef > llvm::object::XCOFFObjectFile::getCFileName ( const XCOFFFileAuxEnt CFileEntPtr) const

◆ getCommonSymbolSizeImpl()

uint64_t llvm::object::XCOFFObjectFile::getCommonSymbolSizeImpl ( DataRefImpl  Symb) const
overridevirtual

◆ getExceptionEntries()

template<typename ExceptEnt >
template Expected< ArrayRef< ExceptionSectionEntry64 > > llvm::object::XCOFFObjectFile::getExceptionEntries ( ) const

◆ getFeatures()

Expected< SubtargetFeatures > llvm::object::XCOFFObjectFile::getFeatures ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 729 of file XCOFFObjectFile.cpp.

◆ getFileFormatName()

StringRef llvm::object::XCOFFObjectFile::getFileFormatName ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 721 of file XCOFFObjectFile.cpp.

References is64Bit().

◆ getFlags()

uint16_t llvm::object::XCOFFObjectFile::getFlags ( ) const

◆ getImportFileTable()

Expected< StringRef > llvm::object::XCOFFObjectFile::getImportFileTable ( ) const

◆ getLogicalNumberOfSymbolTableEntries32()

uint32_t llvm::object::XCOFFObjectFile::getLogicalNumberOfSymbolTableEntries32 ( ) const

Definition at line 875 of file XCOFFObjectFile.cpp.

References fileHeader32().

Referenced by getNumberOfSymbolTableEntries(), and getRelocationSymbol().

◆ getMagic()

uint16_t llvm::object::XCOFFObjectFile::getMagic ( ) const

◆ getNumberOfRelocationEntries()

template<typename T >
Expected< uint32_t > llvm::object::XCOFFObjectFile::getNumberOfRelocationEntries ( const XCOFFSectionHeader< T > &  Sec) const

◆ getNumberOfSections()

uint16_t llvm::object::XCOFFObjectFile::getNumberOfSections ( ) const

◆ getNumberOfSymbolTableEntries()

uint32_t llvm::object::XCOFFObjectFile::getNumberOfSymbolTableEntries ( ) const

◆ getNumberOfSymbolTableEntries64()

uint32_t llvm::object::XCOFFObjectFile::getNumberOfSymbolTableEntries64 ( ) const

◆ getOptionalHeaderSize()

uint16_t llvm::object::XCOFFObjectFile::getOptionalHeaderSize ( ) const

◆ getPointerToSymbolTable()

const void * llvm::object::XCOFFObjectFile::getPointerToSymbolTable ( ) const
inline

Definition at line 649 of file XCOFFObjectFile.h.

Referenced by getSymbolEntryAddressByIndex().

◆ getRawData()

Expected< StringRef > llvm::object::XCOFFObjectFile::getRawData ( const char Start,
uint64_t  Size,
StringRef  Name 
) const

◆ getRawNumberOfSymbolTableEntries32()

int32_t llvm::object::XCOFFObjectFile::getRawNumberOfSymbolTableEntries32 ( ) const

◆ getRelocationOffset()

uint64_t llvm::object::XCOFFObjectFile::getRelocationOffset ( DataRefImpl  Rel) const
overridevirtual
Returns
the relocation offset with the base address of the containing section as zero, or InvalidRelocOffset on errors (such as a relocation that does not refer to an address in any section).

Implements llvm::object::ObjectFile.

Definition at line 577 of file XCOFFObjectFile.cpp.

References getNumberOfSections(), I, InvalidRelocOffset, is64Bit(), llvm::object::DataRefImpl::p, llvm::object::XCOFFSectionHeader32::SectionSize, llvm::object::XCOFFSectionHeader64::SectionSize, llvm::object::XCOFFSectionHeader32::VirtualAddress, llvm::object::XCOFFSectionHeader64::VirtualAddress, and llvm::object::XCOFFRelocation< AddressType >::VirtualAddress.

◆ getRelocationSymbol()

symbol_iterator llvm::object::XCOFFObjectFile::getRelocationSymbol ( DataRefImpl  Rel) const
overridevirtual

◆ getRelocationType()

uint64_t llvm::object::XCOFFObjectFile::getRelocationType ( DataRefImpl  Rel) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 630 of file XCOFFObjectFile.cpp.

References is64Bit(), and llvm::object::DataRefImpl::p.

◆ getRelocationTypeName()

void llvm::object::XCOFFObjectFile::getRelocationTypeName ( DataRefImpl  Rel,
SmallVectorImpl< char > &  Result 
) const
overridevirtual

◆ getSectionAddress()

uint64_t llvm::object::XCOFFObjectFile::getSectionAddress ( DataRefImpl  Sec) const
overridevirtual

◆ getSectionAlignment()

uint64_t llvm::object::XCOFFObjectFile::getSectionAlignment ( DataRefImpl  Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 430 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ getSectionByNum()

Expected< DataRefImpl > llvm::object::XCOFFObjectFile::getSectionByNum ( int16_t  Num) const

◆ getSectionContents()

Expected< ArrayRef< uint8_t > > llvm::object::XCOFFObjectFile::getSectionContents ( DataRefImpl  Sec) const
overridevirtual

◆ getSectionFileOffsetToRawData()

Expected< uintptr_t > llvm::object::XCOFFObjectFile::getSectionFileOffsetToRawData ( XCOFF::SectionTypeFlags  SectType) const

◆ getSectionFlags()

int32_t llvm::object::XCOFFObjectFile::getSectionFlags ( DataRefImpl  Sec) const

◆ getSectionIndex()

uint64_t llvm::object::XCOFFObjectFile::getSectionIndex ( DataRefImpl  Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 389 of file XCOFFObjectFile.cpp.

References is64Bit().

◆ getSectionName()

Expected< StringRef > llvm::object::XCOFFObjectFile::getSectionName ( DataRefImpl  Sec) const
overridevirtual

◆ getSectionSize()

uint64_t llvm::object::XCOFFObjectFile::getSectionSize ( DataRefImpl  Sec) const
overridevirtual

◆ getStartAddress()

Expected< uint64_t > llvm::object::XCOFFObjectFile::getStartAddress ( ) const
overridevirtual

◆ getStringTable()

StringRef llvm::object::XCOFFObjectFile::getStringTable ( ) const

◆ getStringTableEntry()

Expected< StringRef > llvm::object::XCOFFObjectFile::getStringTableEntry ( uint32_t  Offset) const

◆ getSymbolAddress()

Expected< uint64_t > llvm::object::XCOFFObjectFile::getSymbolAddress ( DataRefImpl  Symb) const
overridevirtual

◆ getSymbolAlignment()

uint32_t llvm::object::XCOFFObjectFile::getSymbolAlignment ( DataRefImpl  Symb) const
overridevirtual

◆ getSymbolAuxType()

const XCOFF::SymbolAuxType * llvm::object::XCOFFObjectFile::getSymbolAuxType ( uintptr_t  AuxEntryAddress) const

◆ getSymbolByIndex()

uintptr_t llvm::object::XCOFFObjectFile::getSymbolByIndex ( uint32_t  Idx) const
inline

Definition at line 682 of file XCOFFObjectFile.h.

References Idx, and llvm::XCOFF::SymbolTableEntrySize.

◆ getSymbolEntryAddressByIndex()

uintptr_t llvm::object::XCOFFObjectFile::getSymbolEntryAddressByIndex ( uint32_t  SymbolTableIndex) const

◆ getSymbolFlags()

Expected< uint32_t > llvm::object::XCOFFObjectFile::getSymbolFlags ( DataRefImpl  Symb) const
overridevirtual

◆ getSymbolIndex()

uint32_t llvm::object::XCOFFObjectFile::getSymbolIndex ( uintptr_t  SymEntPtr) const

◆ getSymbolName()

Expected< StringRef > llvm::object::XCOFFObjectFile::getSymbolName ( DataRefImpl  Symb) const
overridevirtual

◆ getSymbolNameByIndex()

Expected< StringRef > llvm::object::XCOFFObjectFile::getSymbolNameByIndex ( uint32_t  SymbolTableIndex) const

◆ getSymbolSection()

Expected< section_iterator > llvm::object::XCOFFObjectFile::getSymbolSection ( DataRefImpl  Symb) const
overridevirtual

◆ getSymbolSectionID()

unsigned llvm::object::XCOFFObjectFile::getSymbolSectionID ( SymbolRef  Sym) const

Definition at line 841 of file XCOFFObjectFile.cpp.

References llvm::object::XCOFFSymbolRef::getSectionNumber(), and Sym.

◆ getSymbolSectionName()

Expected< StringRef > llvm::object::XCOFFObjectFile::getSymbolSectionName ( XCOFFSymbolRef  Ref) const

◆ getSymbolSize()

uint64_t llvm::object::XCOFFObjectFile::getSymbolSize ( DataRefImpl  Symb) const

◆ getSymbolTableOffset32()

uint32_t llvm::object::XCOFFObjectFile::getSymbolTableOffset32 ( ) const

◆ getSymbolTableOffset64()

uint64_t llvm::object::XCOFFObjectFile::getSymbolTableOffset64 ( ) const

◆ getSymbolType()

Expected< SymbolRef::Type > llvm::object::XCOFFObjectFile::getSymbolType ( DataRefImpl  Symb) const
overridevirtual

◆ getSymbolValueImpl()

uint64_t llvm::object::XCOFFObjectFile::getSymbolValueImpl ( DataRefImpl  Symb) const
overridevirtual

◆ getTimeStamp()

int32_t llvm::object::XCOFFObjectFile::getTimeStamp ( ) const

◆ is64Bit()

bool llvm::object::XCOFFObjectFile::is64Bit ( ) const
overridevirtual

◆ isDebugSection()

bool llvm::object::XCOFFObjectFile::isDebugSection ( DataRefImpl  Sec) const
overridevirtual

Reimplemented from llvm::object::ObjectFile.

Definition at line 508 of file XCOFFObjectFile.cpp.

References getSectionFlags(), llvm::XCOFF::STYP_DEBUG, and llvm::XCOFF::STYP_DWARF.

Referenced by getSymbolType().

◆ isRelocatableObject()

bool llvm::object::XCOFFObjectFile::isRelocatableObject ( ) const
overridevirtual

◆ isSectionBSS()

bool llvm::object::XCOFFObjectFile::isSectionBSS ( DataRefImpl  Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 503 of file XCOFFObjectFile.cpp.

References getSectionFlags(), llvm::XCOFF::STYP_BSS, and llvm::XCOFF::STYP_TBSS.

Referenced by getSymbolType().

◆ isSectionCompressed()

bool llvm::object::XCOFFObjectFile::isSectionCompressed ( DataRefImpl  Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 490 of file XCOFFObjectFile.cpp.

◆ isSectionData()

bool llvm::object::XCOFFObjectFile::isSectionData ( DataRefImpl  Sec) const
overridevirtual

◆ isSectionText()

bool llvm::object::XCOFFObjectFile::isSectionText ( DataRefImpl  Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 494 of file XCOFFObjectFile.cpp.

References getSectionFlags(), and llvm::XCOFF::STYP_TEXT.

◆ isSectionVirtual()

bool llvm::object::XCOFFObjectFile::isSectionVirtual ( DataRefImpl  Sec) const
overridevirtual

◆ mapDebugSectionName()

StringRef llvm::object::XCOFFObjectFile::mapDebugSectionName ( StringRef  Name) const
overridevirtual

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

Reimplemented from llvm::object::ObjectFile.

Definition at line 747 of file XCOFFObjectFile.cpp.

References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), and Name.

◆ moveRelocationNext()

void llvm::object::XCOFFObjectFile::moveRelocationNext ( DataRefImpl Rel) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 570 of file XCOFFObjectFile.cpp.

References is64Bit(), and llvm::object::DataRefImpl::p.

◆ moveSectionNext()

void llvm::object::XCOFFObjectFile::moveSectionNext ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 371 of file XCOFFObjectFile.cpp.

References llvm::object::DataRefImpl::p, and Ptr.

◆ moveSymbolNext()

void llvm::object::XCOFFObjectFile::moveSymbolNext ( DataRefImpl Symb) const
overridevirtual

◆ relocations()

template<typename Shdr , typename Reloc >
Expected< ArrayRef< Reloc > > llvm::object::XCOFFObjectFile::relocations ( const Shdr Sec) const

◆ section_begin()

section_iterator llvm::object::XCOFFObjectFile::section_begin ( ) const
overridevirtual

◆ section_end()

section_iterator llvm::object::XCOFFObjectFile::section_end ( ) const
overridevirtual

◆ section_rel_begin()

relocation_iterator llvm::object::XCOFFObjectFile::section_rel_begin ( DataRefImpl  Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 518 of file XCOFFObjectFile.cpp.

◆ section_rel_end()

relocation_iterator llvm::object::XCOFFObjectFile::section_rel_end ( DataRefImpl  Sec) const
overridevirtual

◆ sections32()

ArrayRef< XCOFFSectionHeader32 > llvm::object::XCOFFObjectFile::sections32 ( ) const

Definition at line 987 of file XCOFFObjectFile.cpp.

References assert(), getNumberOfSections(), and is64Bit().

Referenced by getNumberOfRelocationEntries().

◆ sections64()

ArrayRef< XCOFFSectionHeader64 > llvm::object::XCOFFObjectFile::sections64 ( ) const

Definition at line 980 of file XCOFFObjectFile.cpp.

References assert(), getNumberOfSections(), and is64Bit().

◆ symbol_begin()

basic_symbol_iterator llvm::object::XCOFFObjectFile::symbol_begin ( ) const
overridevirtual

◆ symbol_end()

basic_symbol_iterator llvm::object::XCOFFObjectFile::symbol_end ( ) const
overridevirtual

◆ symbols()

XCOFFObjectFile::xcoff_symbol_iterator_range llvm::object::XCOFFObjectFile::symbols ( ) const

Definition at line 702 of file XCOFFObjectFile.cpp.

References symbol_begin(), and symbol_end().

◆ toSymbolRef()

XCOFFSymbolRef llvm::object::XCOFFObjectFile::toSymbolRef ( DataRefImpl  Ref) const

◆ tryGetCPUName()

std::optional< StringRef > llvm::object::XCOFFObjectFile::tryGetCPUName ( ) const
overridevirtual

Reimplemented from llvm::object::ObjectFile.

Definition at line 1236 of file XCOFFObjectFile.cpp.

Friends And Related Function Documentation

◆ ObjectFile::createXCOFFObjectFile

Expected< std::unique_ptr< ObjectFile > > ObjectFile::createXCOFFObjectFile ( MemoryBufferRef  Object,
unsigned  FileType 
)
friend

Member Data Documentation

◆ InvalidRelocOffset

constexpr uint64_t llvm::object::XCOFFObjectFile::InvalidRelocOffset
staticconstexpr
Initial value:
=
std::numeric_limits<uint64_t>::max()

Definition at line 581 of file XCOFFObjectFile.h.

Referenced by getRelocationOffset().


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