llvm.org GIT mirror llvm / 5d73a2a
Use TargetELFWriterInfo class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33573 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 13 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
3535 #include "llvm/CodeGen/MachineCodeEmitter.h"
3636 #include "llvm/CodeGen/MachineConstantPool.h"
3737 #include "llvm/Target/TargetData.h"
38 #include "llvm/Target/TargetELFWriterInfo.h"
3839 #include "llvm/Target/TargetMachine.h"
3940 #include "llvm/Support/Mangler.h"
4041 #include "llvm/Support/OutputBuffer.h"
161162 //===----------------------------------------------------------------------===//
162163
163164 ELFWriter::ELFWriter(std::ostream &o, TargetMachine &tm) : O(o), TM(tm) {
164 e_machine = 0; // e_machine defaults to 'No Machine'
165165 e_flags = 0; // e_flags defaults to 0, no flags.
166166
167167 is64Bit = TM.getTargetData()->getPointerSizeInBits() == 64;
196196
197197 // This should change for shared objects.
198198 FHOut.outhalf(1); // e_type = ET_REL
199 FHOut.outhalf(e_machine); // e_machine = whatever the target wants
199 FHOut.outword(TM.getELFWriterInfo()->getEMachine()); // target-defined
200200 FHOut.outword(1); // e_version = 1
201201 FHOut.outaddr(0); // e_entry = 0 -> no entry point in .o file
202202 FHOut.outaddr(0); // e_phoff = 0 -> no program header for .o