[llvm-commits] CVS: llvm/lib/CodeGen/ELFWriter.cpp
Bill Wendling
isanbard at gmail.com
Fri Jan 26 18:56:00 PST 2007
Changes in directory llvm/lib/CodeGen:
ELFWriter.cpp updated: 1.35 -> 1.36
---
Log message:
Use TargetELFWriterInfo class.
---
Diffs of the changes: (+2 -2)
ELFWriter.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/CodeGen/ELFWriter.cpp
diff -u llvm/lib/CodeGen/ELFWriter.cpp:1.35 llvm/lib/CodeGen/ELFWriter.cpp:1.36
--- llvm/lib/CodeGen/ELFWriter.cpp:1.35 Sat Jan 20 16:35:55 2007
+++ llvm/lib/CodeGen/ELFWriter.cpp Fri Jan 26 20:55:44 2007
@@ -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 @@
//===----------------------------------------------------------------------===//
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 @@
// 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
More information about the llvm-commits
mailing list