What does MASM32 output to: COFF or OMF? I know it is a PE file but does COFF or OMF have anything to do with the format ? What is COFF or OMF? What would be examples of COFF or OMF do they even mean anything to the final executable or are these just linker formats ?? Do any of these formats have adfantages over others. Is PE, LE, NE in the same category as COFF and OMF ? I know its a lot of questions but I can't seem to find anywhere on the web where this type of stuff is discussed.
Devin OMF and COFF is a linker format only...ie the format that the assembler outputs (usually with no absolute adresses set yet and no external references set also) Then the linker reads this format and outputs the PE,NE,LE, EXE,COM,plain binary etc OMF was a format used by Borland's TASM...(still the format for TASM today) and other assemblers. Sometime near our days Micro decided to change this format default to COFF (so tosay MASM and othere like NASM default to this COFF format) COFF is a more general format copied from UNIX i think... Advantages / disadvantages...eh...i dont really know just 2 observations of mine: 1. OMF is very fast to link 10x faster them COFF but is older format and slowly goes away 2. COFF is bigger and slower...but also the UNIX format and more versatile. It also looks like all new assemblers support only this one...this is the "new way" so stick to it unless you have to change for a real hard reason
MASM in 32 bit is linked as COFF, the old 16 bit format of MASM is OMF and this is why you use a different linker for both. You can test the size between both formats in 32 bit by building the same code in MASM and TASM, TASM is still in the old OMF format and the price is that it builds bigger for the same code. If you really needed to find it, there has been documentation in the past for Object Module Format (OMF) and there should be information around at the moment on Common Object File Format (COFF) but I cannot think of a reason at the moment to bother. Regards, email@example.com
The coff file format is explained at http://msdn.microsoft.com/library/specs/msdn_pecoff.htm It's simpler than the OMF, which is described at http://developer.intel.com/vtune/tis.htm (see Chap. 7). coff is derived from UNIX and is used by both obj and lib files. It is nearly completely described in Matt Pietrek's book, Windows 95 System Programming Secrets, Chap. 8 (unfortunately out of print). This format is worth understanding, though it's not as critical as the PE file format. Essential if you want to know what the compiler and linker are really doing and how it all fits together.