LLVM API Documentation

llvm::TargetELFWriterInfo Class Reference

#include <TargetELFWriterInfo.h>

Inheritance diagram for llvm::TargetELFWriterInfo:
[legend]
Collaboration diagram for llvm::TargetELFWriterInfo:
[legend]

List of all members.

Public Types

enum  MachineType {
  EM_NONE = 0, EM_M32 = 1, EM_SPARC = 2, EM_386 = 3,
  EM_68K = 4, EM_88K = 5, EM_486 = 6, EM_860 = 7,
  EM_MIPS = 8, EM_PPC = 20, EM_ARM = 40, EM_ALPHA = 41,
  EM_SPARCV9 = 43, EM_X86_64 = 62
}
enum  { ELFCLASS32 = 1, ELFCLASS64 = 2 }
enum  { ELFDATA2LSB = 1, ELFDATA2MSB = 2 }

Public Member Functions

 TargetELFWriterInfo (TargetMachine &tm)
virtual ~TargetELFWriterInfo ()
unsigned short getEMachine () const
unsigned getEFlags () const
unsigned getEIClass () const
unsigned getEIData () const
unsigned getHdrSize () const
 ELF Header and ELF Section Header Info.
unsigned getSHdrSize () const
unsigned getSymTabEntrySize () const
 Symbol Table Info.
unsigned getPrefELFAlignment () const
unsigned getRelocationEntrySize () const
 getRelocationEntrySize - Entry size used in the relocation section
virtual unsigned getRelocationType (unsigned MachineRelTy) const =0
virtual bool hasRelocationAddend () const =0
virtual long int getDefaultAddendForRelTy (unsigned RelTy, long int Modifier=0) const =0
virtual unsigned getRelocationTySize (unsigned RelTy) const =0
 getRelTySize - Returns the size of relocatable field in bits
virtual bool isPCRelativeRel (unsigned RelTy) const =0
 isPCRelativeRel - True if the relocation type is pc relative
virtual unsigned getAbsoluteLabelMachineRelTy () const =0
virtual long int computeRelocation (unsigned SymOffset, unsigned RelOffset, unsigned RelTy) const =0

Protected Attributes

unsigned short EMachine
TargetMachine & TM
bool is64Bit
bool isLittleEndian


Detailed Description

Definition at line 26 of file TargetELFWriterInfo.h.


Member Enumeration Documentation

Enumerator:
EM_NONE 
EM_M32 
EM_SPARC 
EM_386 
EM_68K 
EM_88K 
EM_486 
EM_860 
EM_MIPS 
EM_PPC 
EM_ARM 
EM_ALPHA 
EM_SPARCV9 
EM_X86_64 

Definition at line 36 of file TargetELFWriterInfo.h.

anonymous enum

Enumerator:
ELFCLASS32 
ELFCLASS64 

Definition at line 54 of file TargetELFWriterInfo.h.

anonymous enum

Enumerator:
ELFDATA2LSB 
ELFDATA2MSB 

Definition at line 60 of file TargetELFWriterInfo.h.


Constructor & Destructor Documentation

TargetELFWriterInfo::TargetELFWriterInfo ( TargetMachine &  tm  )  [explicit]

TargetELFWriterInfo::~TargetELFWriterInfo (  )  [virtual]

Definition at line 25 of file TargetELFWriterInfo.cpp.


Member Function Documentation

unsigned short llvm::TargetELFWriterInfo::getEMachine (  )  const [inline]

Definition at line 68 of file TargetELFWriterInfo.h.

References EMachine.

Referenced by llvm::ELFWriter::doInitialization().

unsigned llvm::TargetELFWriterInfo::getEFlags (  )  const [inline]

Definition at line 69 of file TargetELFWriterInfo.h.

Referenced by llvm::ELFWriter::doInitialization().

unsigned llvm::TargetELFWriterInfo::getEIClass (  )  const [inline]

Definition at line 70 of file TargetELFWriterInfo.h.

References ELFCLASS32, ELFCLASS64, and is64Bit.

Referenced by llvm::ELFWriter::doInitialization().

unsigned llvm::TargetELFWriterInfo::getEIData (  )  const [inline]

Definition at line 71 of file TargetELFWriterInfo.h.

References ELFDATA2LSB, ELFDATA2MSB, and isLittleEndian.

Referenced by llvm::ELFWriter::doInitialization().

unsigned llvm::TargetELFWriterInfo::getHdrSize (  )  const [inline]

ELF Header and ELF Section Header Info.

Definition at line 76 of file TargetELFWriterInfo.h.

References is64Bit.

Referenced by llvm::ELFWriter::doInitialization().

unsigned llvm::TargetELFWriterInfo::getSHdrSize (  )  const [inline]

Definition at line 77 of file TargetELFWriterInfo.h.

References is64Bit.

Referenced by llvm::ELFWriter::doInitialization().

unsigned llvm::TargetELFWriterInfo::getSymTabEntrySize (  )  const [inline]

Symbol Table Info.

Definition at line 80 of file TargetELFWriterInfo.h.

References is64Bit.

unsigned llvm::TargetELFWriterInfo::getPrefELFAlignment (  )  const [inline]

getPrefELFAlignment - Returns the preferred alignment for ELF. This is used to align some sections.

Definition at line 84 of file TargetELFWriterInfo.h.

References is64Bit.

unsigned llvm::TargetELFWriterInfo::getRelocationEntrySize (  )  const [inline]

getRelocationEntrySize - Entry size used in the relocation section

Definition at line 87 of file TargetELFWriterInfo.h.

References hasRelocationAddend(), and is64Bit.

virtual unsigned llvm::TargetELFWriterInfo::getRelocationType ( unsigned  MachineRelTy  )  const [pure virtual]

getRelocationType - Returns the target specific ELF Relocation type. 'MachineRelTy' contains the object code independent relocation type

Implemented in llvm::X86ELFWriterInfo.

virtual bool llvm::TargetELFWriterInfo::hasRelocationAddend (  )  const [pure virtual]

hasRelocationAddend - True if the target uses an addend in the ELF relocation entry.

Implemented in llvm::X86ELFWriterInfo.

Referenced by getRelocationEntrySize().

virtual long int llvm::TargetELFWriterInfo::getDefaultAddendForRelTy ( unsigned  RelTy,
long int  Modifier = 0 
) const [pure virtual]

getDefaultAddendForRelTy - Gets the default addend value for a relocation entry based on the target ELF relocation type.

Implemented in llvm::X86ELFWriterInfo.

virtual unsigned llvm::TargetELFWriterInfo::getRelocationTySize ( unsigned  RelTy  )  const [pure virtual]

getRelTySize - Returns the size of relocatable field in bits

Implemented in llvm::X86ELFWriterInfo.

virtual bool llvm::TargetELFWriterInfo::isPCRelativeRel ( unsigned  RelTy  )  const [pure virtual]

isPCRelativeRel - True if the relocation type is pc relative

Implemented in llvm::X86ELFWriterInfo.

virtual unsigned llvm::TargetELFWriterInfo::getAbsoluteLabelMachineRelTy (  )  const [pure virtual]

getJumpTableRelocationTy - Returns the machine relocation type used to reference a jumptable.

Implemented in llvm::X86ELFWriterInfo.

virtual long int llvm::TargetELFWriterInfo::computeRelocation ( unsigned  SymOffset,
unsigned  RelOffset,
unsigned  RelTy 
) const [pure virtual]

computeRelocation - Some relocatable fields could be relocated directly, avoiding the relocation symbol emission, compute the final relocation value for this symbol.

Implemented in llvm::X86ELFWriterInfo.


Member Data Documentation

Definition at line 30 of file TargetELFWriterInfo.h.

Referenced by getEMachine(), and llvm::X86ELFWriterInfo::X86ELFWriterInfo().

Definition at line 31 of file TargetELFWriterInfo.h.

Referenced by TargetELFWriterInfo().

Definition at line 32 of file TargetELFWriterInfo.h.

Referenced by getEIData(), and TargetELFWriterInfo().


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