LLVM API Documentation
#include <ELFWriter.h>
Public Member Functions | |
| ObjectCodeEmitter * | getObjectCodeEmitter () |
| Return the ELFCodeEmitter as an instance of ObjectCodeEmitter. | |
| ELFWriter (raw_ostream &O, TargetMachine &TM) | |
| ~ELFWriter () | |
Static Public Attributes | |
| static char | ID = 0 |
Protected Member Functions | |
| bool | doInitialization (Module &M) |
| bool | runOnMachineFunction (MachineFunction &MF) |
| bool | doFinalization (Module &M) |
Protected Attributes | |
| raw_ostream & | O |
| Output stream to send the resultant object file to. | |
| TargetMachine & | TM |
| Target machine description. | |
| MCContext & | OutContext |
| Context object for machine code objects. | |
| const TargetELFWriterInfo * | TEW |
| Target Elf Writer description. | |
| Mangler * | Mang |
| Mang - The object used to perform name mangling for this module. | |
| ELFCodeEmitter * | ElfCE |
| const TargetLoweringObjectFile & | TLOF |
| const TargetAsmInfo * | TAI |
| bool | is64Bit |
| bool | isLittleEndian |
Friends | |
| class | ELFCodeEmitter |
Definition at line 52 of file ELFWriter.h.
| ELFWriter::ELFWriter | ( | raw_ostream & | O, | |
| TargetMachine & | TM | |||
| ) |
Definition at line 76 of file ELFWriter.cpp.
References ElfCE, ELFCodeEmitter, llvm::TargetMachine::getELFWriterInfo(), llvm::TargetMachine::getTargetAsmInfo(), TAI, TEW, and TM.
| ELFWriter::~ELFWriter | ( | ) |
| ObjectCodeEmitter* llvm::ELFWriter::getObjectCodeEmitter | ( | ) | [inline] |
Return the ELFCodeEmitter as an instance of ObjectCodeEmitter.
Definition at line 58 of file ELFWriter.h.
References ElfCE.
Referenced by llvm::AddELFWriter().
doInitialization - Emit the file header and all of the global variables for the module to the ELF file.
Reimplemented from llvm::FunctionPass.
Definition at line 101 of file ELFWriter.cpp.
References llvm::BinaryObject::emitAlignment(), llvm::BinaryObject::emitByte(), llvm::BinaryObject::emitWord(), llvm::BinaryObject::emitWord16(), llvm::BinaryObject::emitWord32(), llvm::ET_REL, llvm::EV_CURRENT, llvm::TargetELFWriterInfo::getEFlags(), llvm::TargetELFWriterInfo::getEIClass(), llvm::TargetELFWriterInfo::getEIData(), llvm::TargetELFWriterInfo::getEMachine(), llvm::ELFSym::getFileSym(), llvm::TargetELFWriterInfo::getHdrSize(), llvm::TargetELFWriterInfo::getSHdrSize(), Mang, OutContext, llvm::BinaryObject::size(), TEW, TLOF, and TM.
| bool ELFWriter::runOnMachineFunction | ( | MachineFunction & | MF | ) | [protected, virtual] |
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.
Implements llvm::MachineFunctionPass.
Definition at line 661 of file ELFWriter.cpp.
doFinalization - Now that the module has been completely processed, emit the ELF file to 'O'.
doFinalization - Now that the module has been completely processed, emit the ELF file to 'O'.
Reimplemented from llvm::FunctionPass.
Definition at line 668 of file ELFWriter.cpp.
References llvm::SetVector< T, Vector, Set >::begin(), llvm::SetVector< T, Vector, Set >::end(), llvm::ELFSym::getExtSym(), llvm::Module::getModuleIdentifier(), llvm::TargetAsmInfo::getNonexecutableStackDirective(), llvm::ELFSym::getSectionSym(), llvm::Module::global_begin(), llvm::Module::global_end(), Mang, llvm::ELFSection::SectionIdx, llvm::ELFSym::SectionIdx, llvm::ELFSection::Sym, and TAI.
friend class ELFCodeEmitter [friend] |
char ELFWriter::ID = 0 [static] |
Definition at line 55 of file ELFWriter.h.
raw_ostream& llvm::ELFWriter::O [protected] |
TargetMachine& llvm::ELFWriter::TM [protected] |
Target machine description.
Definition at line 70 of file ELFWriter.h.
Referenced by doInitialization(), and ELFWriter().
MCContext& llvm::ELFWriter::OutContext [protected] |
Context object for machine code objects.
Definition at line 73 of file ELFWriter.h.
Referenced by doInitialization(), and ~ELFWriter().
const TargetELFWriterInfo* llvm::ELFWriter::TEW [protected] |
Target Elf Writer description.
Definition at line 76 of file ELFWriter.h.
Referenced by doInitialization(), and ELFWriter().
Mangler* llvm::ELFWriter::Mang [protected] |
Mang - The object used to perform name mangling for this module.
Definition at line 79 of file ELFWriter.h.
Referenced by doFinalization(), and doInitialization().
ELFCodeEmitter* llvm::ELFWriter::ElfCE [protected] |
MCE - The MachineCodeEmitter object that we are exposing to emit machine code for functions to the .o file.
Definition at line 83 of file ELFWriter.h.
Referenced by ELFWriter(), getObjectCodeEmitter(), and ~ELFWriter().
const TargetLoweringObjectFile& llvm::ELFWriter::TLOF [protected] |
TLOF - Target Lowering Object File, provide section names for globals and other object file specific stuff
Definition at line 87 of file ELFWriter.h.
Referenced by doInitialization().
const TargetAsmInfo* llvm::ELFWriter::TAI [protected] |
TAI - Target Asm Info, provide information about section names for globals and other target specific stuff.
Definition at line 91 of file ELFWriter.h.
Referenced by doFinalization(), and ELFWriter().
bool llvm::ELFWriter::is64Bit [protected] |
is64Bit/isLittleEndian - This information is inferred from the target machine directly, indicating whether to emit a 32- or 64-bit ELF file.
Definition at line 99 of file ELFWriter.h.
bool llvm::ELFWriter::isLittleEndian [protected] |
Definition at line 99 of file ELFWriter.h.