[PATCH] D44018: [COFF] Make the DOS stub a real DOS program

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 08:23:26 PST 2018


hans added inline comments.


================
Comment at: COFF/Writer.cpp:45
 
+/* To re-generate DOSProgram:
+$ cat > /tmp/DOSProgram.asm
----------------
Grateful for ideas on how to format/do this better.


================
Comment at: COFF/Writer.cpp:693
+  Buf += sizeof(dos_header);
   DOS->Magic[0] = 'M';
   DOS->Magic[1] = 'Z';
----------------
Is there a guarantee that the buffer is zero-initialized? Otherwise maybe we should memset DOS here, because it's important that the un-set fields are really zero if this is going to be loaded.


https://reviews.llvm.org/D44018





More information about the llvm-commits mailing list