LLVM  10.0.0svn
Public Member Functions | Friends | List of all members
llvm::object::XCOFFObjectFile Class Reference

#include "llvm/Object/XCOFFObjectFile.h"

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

Public Member Functions

void moveSymbolNext (DataRefImpl &Symb) const override
 
uint32_t getSymbolFlags (DataRefImpl Symb) const override
 
basic_symbol_iterator symbol_begin () const override
 
basic_symbol_iterator symbol_end () const override
 
Expected< StringRefgetSymbolName (DataRefImpl Symb) const override
 
Expected< uint64_t > getSymbolAddress (DataRefImpl Symb) const override
 
uint64_t getSymbolValueImpl (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 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. More...
 
StringRef getFileFormatName () const override
 
Triple::ArchType getArch () const override
 
SubtargetFeatures getFeatures () const override
 
Expected< uint64_t > getStartAddress () const override
 
bool isRelocatableObject () const override
 True if this is a relocatable object (.o/.obj). More...
 
bool is64Bit () const
 
const XCOFFSymbolEntrygetPointerToSymbolTable () const
 
Expected< StringRefgetSymbolSectionName (const XCOFFSymbolEntry *SymEntPtr) const
 
const XCOFFSymbolEntrytoSymbolEntry (DataRefImpl Ref) 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
 
uint16_t getOptionalHeaderSize () const
 
uint16_t getFlags () const
 
ArrayRef< XCOFFSectionHeader32sections32 () const
 
ArrayRef< XCOFFSectionHeader64sections64 () const
 
- Public Member Functions inherited from llvm::object::ObjectFile
 ObjectFile ()=delete
 
 ObjectFile (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 void setARMSubArch (Triple &TheTriple) const
 
Triple makeTriple () const
 Create a triple from the data in this object file. More...
 
virtual StringRef mapDebugSectionName (StringRef Name) const
 Maps a debug section name to a standard DWARF section name. More...
 
- 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 ()
 
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 isXCOFF () const
 
bool isWasm () const
 
bool isCOFFImportFile () const
 
bool isIR () const
 
bool isMinidump () const
 
bool isLittleEndian () const
 
bool isWinRes () const
 
Triple::ObjectFormatType getTripleObjectFormat () const
 

Friends

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

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 >
 
- 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)
 
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)
 
static Expected< std::unique_ptr< MachOObjectFile > > createMachOObjectFile (MemoryBufferRef Object, uint32_t UniversalCputype=0, uint32_t UniversalIndex=0)
 
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)
 
static Expected< std::unique_ptr< SymbolicFile > > createSymbolicFile (MemoryBufferRef Object)
 
static Expected< OwningBinary< SymbolicFile > > createSymbolicFile (StringRef ObjectPath)
 
static bool classof (const Binary *v)
 
- Static Public Member Functions inherited from llvm::object::Binary
static std::error_code checkOffset (MemoryBufferRef M, uintptr_t Addr, const uint64_t Size)
 
- Protected Types inherited from llvm::object::Binary
enum  {
  ID_Archive, ID_MachOUniversalBinary, ID_COFFImportFile, ID_IR,
  ID_Minidump, ID_WinRes, 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 inherited from llvm::object::ObjectFile
 ObjectFile (unsigned int Type, MemoryBufferRef Source)
 
const uint8_t * base () const
 
Error printSymbolName (raw_ostream &OS, DataRefImpl Symb) const override
 
virtual uint32_t getSymbolAlignment (DataRefImpl Symb) const
 
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 section_iterator getRelocatedSection (DataRefImpl Sec) const
 
uint64_t getSymbolValue (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 115 of file XCOFFObjectFile.h.

Member Function Documentation

◆ getArch()

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

Implements llvm::object::ObjectFile.

Definition at line 329 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 323 of file XCOFFObjectFile.cpp.

References is64Bit().

◆ getCommonSymbolSizeImpl()

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

Implements llvm::object::ObjectFile.

Definition at line 151 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ getFeatures()

SubtargetFeatures llvm::object::XCOFFObjectFile::getFeatures ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 333 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ getFileFormatName()

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

Implements llvm::object::ObjectFile.

Definition at line 325 of file XCOFFObjectFile.cpp.

References is64Bit().

◆ getFlags()

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

◆ getLogicalNumberOfSymbolTableEntries32()

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

Definition at line 426 of file XCOFFObjectFile.cpp.

Referenced by symbol_end().

◆ getMagic()

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

◆ getNumberOfSections()

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

◆ getNumberOfSymbolTableEntries64()

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

◆ getOptionalHeaderSize()

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

◆ getPointerToSymbolTable()

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

Definition at line 213 of file XCOFFObjectFile.h.

References assert(), llvm::RawInstrProf::getMagic(), and is64Bit().

◆ getRawNumberOfSymbolTableEntries32()

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

◆ getRelocationOffset()

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

Implements llvm::object::ObjectFile.

Definition at line 266 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ 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 277 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ getRelocationTypeName()

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

Implements llvm::object::ObjectFile.

Definition at line 283 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ 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 219 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ getSectionContents()

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

Implements llvm::object::ObjectFile.

Definition at line 215 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ getSectionIndex()

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

Implements llvm::object::ObjectFile.

Definition at line 196 of file XCOFFObjectFile.cpp.

References is64Bit().

◆ getSectionName()

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

Implements llvm::object::ObjectFile.

Definition at line 183 of file XCOFFObjectFile.cpp.

References llvm::object::generateStringRef().

◆ getSectionSize()

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

◆ getStartAddress()

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

Reimplemented from llvm::object::ObjectFile.

Definition at line 344 of file XCOFFObjectFile.cpp.

References is64Bit().

◆ getSymbolAddress()

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

Implements llvm::object::ObjectFile.

Definition at line 141 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ getSymbolFlags()

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

Implements llvm::object::SymbolicFile.

Definition at line 289 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ getSymbolName()

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

◆ getSymbolSection()

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

◆ getSymbolSectionName()

Expected< StringRef > llvm::object::XCOFFObjectFile::getSymbolSectionName ( const XCOFFSymbolEntry SymEntPtr) 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

◆ isRelocatableObject()

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

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

Implements llvm::object::ObjectFile.

Definition at line 338 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ isSectionBSS()

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

Implements llvm::object::ObjectFile.

Definition at line 240 of file XCOFFObjectFile.cpp.

References llvm::XCOFF::STYP_BSS, and llvm::XCOFF::STYP_TBSS.

◆ isSectionCompressed()

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

Implements llvm::object::ObjectFile.

Definition at line 225 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ isSectionData()

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

Implements llvm::object::ObjectFile.

Definition at line 235 of file XCOFFObjectFile.cpp.

References llvm::XCOFF::STYP_DATA, and llvm::XCOFF::STYP_TDATA.

◆ isSectionText()

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

Implements llvm::object::ObjectFile.

Definition at line 231 of file XCOFFObjectFile.cpp.

References llvm::XCOFF::STYP_TEXT.

◆ isSectionVirtual()

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

Implements llvm::object::ObjectFile.

Definition at line 245 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ moveRelocationNext()

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

Implements llvm::object::ObjectFile.

Definition at line 261 of file XCOFFObjectFile.cpp.

References llvm_unreachable.

◆ moveSectionNext()

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

Implements llvm::object::ObjectFile.

Definition at line 178 of file XCOFFObjectFile.cpp.

References llvm::object::DataRefImpl::p.

◆ moveSymbolNext()

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

◆ 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

◆ section_rel_end()

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

◆ sections32()

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

◆ sections64()

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

Definition at line 461 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

◆ toSymbolEntry()

const XCOFFSymbolEntry * llvm::object::XCOFFObjectFile::toSymbolEntry ( DataRefImpl  Ref) const

Friends And Related Function Documentation

◆ ObjectFile::createXCOFFObjectFile

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

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