diff options
author | Bill Wendling <isanbard@gmail.com> | 2007-01-27 02:55:44 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2007-01-27 02:55:44 +0000 |
commit | 5d73a2a156d9b232cf31150b3aff17fb07230c82 (patch) | |
tree | 901f759292cb3ec144b3e378cb0725c95c38061b /lib/CodeGen/ELFWriter.cpp | |
parent | 98b5795f6227fd31e6cd2852adf5a641ea1ce3be (diff) |
Use TargetELFWriterInfo class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ELFWriter.cpp')
-rw-r--r-- | lib/CodeGen/ELFWriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp index 3b9653740c..5b39ab0540 100644 --- a/lib/CodeGen/ELFWriter.cpp +++ b/lib/CodeGen/ELFWriter.cpp @@ -36,6 +36,7 @@ #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/Target/TargetData.h" +#include "llvm/Target/TargetELFWriterInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Support/Mangler.h" #include "llvm/Support/OutputBuffer.h" @@ -162,7 +163,6 @@ bool ELFCodeEmitter::finishFunction(MachineFunction &F) { //===----------------------------------------------------------------------===// ELFWriter::ELFWriter(std::ostream &o, TargetMachine &tm) : O(o), TM(tm) { - e_machine = 0; // e_machine defaults to 'No Machine' e_flags = 0; // e_flags defaults to 0, no flags. is64Bit = TM.getTargetData()->getPointerSizeInBits() == 64; @@ -197,7 +197,7 @@ bool ELFWriter::doInitialization(Module &M) { // This should change for shared objects. FHOut.outhalf(1); // e_type = ET_REL - FHOut.outhalf(e_machine); // e_machine = whatever the target wants + FHOut.outword(TM.getELFWriterInfo()->getEMachine()); // target-defined FHOut.outword(1); // e_version = 1 FHOut.outaddr(0); // e_entry = 0 -> no entry point in .o file FHOut.outaddr(0); // e_phoff = 0 -> no program header for .o |