nasm/output
H. Peter Anvin 10ba8490ce outcoff: set the "virtual size field" to zero (BR 1351586)
Per SF bug report 1351586:

The COFF spec suggests that the "Virtual Size" field (which
immediately follows the name field inside a section header) be set to
0 for an object file.

By contrast (as documented in comment #4 at the beginning of its
outcoff.c file) NASM sets it to a particular non-0 value.

MASM 6.15 matches NASM for both 16- and 32-bit object files,
i.e. emits non-0 values.

MASM 8 (from VS 2005 Beta) matches the COFF spec for 64-bit object
files, i.e. emits 0.

GAS matches the COFF spec for 32-bit object files (MinGW or Cygwin),
i.e. also emits 0.

Older versions of GNU ld seem to honor said "Virtual Size" field
whereas newer versions do not.  As a result those older versions
generate "bloated" image files.

Since the COFF spec and the real world seem to disagree for this case,
it might make sense to add a method for selecting between the two to
NASM.

Date: 2005-11-28 15:39
Sender: nasm64developer
Logged In: YES
user_id=804543

MASM 8 (from VS 2005 Beta) also matches the COFF spec for 16- and
32-bit object files, i.e. emits 0.

That said, NASM should always emit 0 too. Therefore I am turning this
from a support request into a bug.
2007-09-24 17:02:41 -07:00
..
outaout.c Finishing touches on perfect hash tokenizer; actually turn the thing on 2007-08-30 22:35:34 +00:00
outas86.c Placated unreferenced types. 2007-04-14 00:46:25 +00:00
outbin.c Minor fixes needed to compile with MSVC++ 2005 2007-09-16 22:15:34 -07:00
outcoff.c outcoff: set the "virtual size field" to zero (BR 1351586) 2007-09-24 17:02:41 -07:00
outdbg.c add "const" to output/outdbg.c 2007-09-18 02:06:09 -04:00
outelf32.c Minor fixes needed to compile with MSVC++ 2005 2007-09-16 22:15:34 -07:00
outelf64.c elf64: fix 32-bit truncations 2007-09-18 22:22:49 -07:00
outieee.c c99 printf/fprintf compliance. 2007-04-14 00:10:59 +00:00
outmacho.c Minor fixes needed to compile with MSVC++ 2005 2007-09-16 22:15:34 -07:00
outobj.c Finishing touches on perfect hash tokenizer; actually turn the thing on 2007-08-30 22:35:34 +00:00
outrdf2.c Minor fixes needed to compile with MSVC++ 2005 2007-09-16 22:15:34 -07:00
outrdf.c Fixed RDF/2 to comply with "maxbits" use. 2007-04-18 02:24:34 +00:00