comparison lib/MC/WinCOFFObjectWriter.cpp @ 33:e4204d083e25 LLVM3.5

LLVM 3.5
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 14:32:10 +0900
parents 95c75e76d11b
children 54457678186b
comparison
equal deleted inserted replaced
1:f783a2dd24b1 33:e4204d083e25
349 349
350 /// This function takes a section data object from the assembler 350 /// This function takes a section data object from the assembler
351 /// and creates the associated COFF section staging object. 351 /// and creates the associated COFF section staging object.
352 void WinCOFFObjectWriter::DefineSection(MCSectionData const &SectionData) { 352 void WinCOFFObjectWriter::DefineSection(MCSectionData const &SectionData) {
353 assert(SectionData.getSection().getVariant() == MCSection::SV_COFF 353 assert(SectionData.getSection().getVariant() == MCSection::SV_COFF
354 && "Got non COFF section in the COFF backend!"); 354 && "Got non-COFF section in the COFF backend!");
355 // FIXME: Not sure how to verify this (at least in a debug build). 355 // FIXME: Not sure how to verify this (at least in a debug build).
356 MCSectionCOFF const &Sec = 356 MCSectionCOFF const &Sec =
357 static_cast<MCSectionCOFF const &>(SectionData.getSection()); 357 static_cast<MCSectionCOFF const &>(SectionData.getSection());
358 358
359 COFFSection *coff_section = createSection(Sec.getSectionName()); 359 COFFSection *coff_section = createSection(Sec.getSectionName());
843 Sec->Header.NumberOfLineNumbers; 843 Sec->Header.NumberOfLineNumbers;
844 } 844 }
845 845
846 Header.PointerToSymbolTable = offset; 846 Header.PointerToSymbolTable = offset;
847 847
848 Header.TimeDateStamp = sys::TimeValue::now().toEpochTime(); 848 // We want a deterministic output. It looks like GNU as also writes 0 in here.
849 Header.TimeDateStamp = 0;
849 850
850 // Write it all to disk... 851 // Write it all to disk...
851 WriteFileHeader(Header); 852 WriteFileHeader(Header);
852 853
853 { 854 {