Fix a bug in the ELF writer that caused it to produce malformed

ELF headers. The ELF writer still isn't generally usable though.

llvm-svn: 50652
This commit is contained in:
Dan Gohman 2008-05-05 16:48:32 +00:00
parent 6fd71c6512
commit e3a63ba3cd
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ bool ELFWriter::doInitialization(Module &M) {
// This should change for shared objects.
FHOut.outhalf(1); // e_type = ET_REL
FHOut.outword(TM.getELFWriterInfo()->getEMachine()); // target-defined
FHOut.outhalf(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