Currently, NASM switches to 32-bit OBJ files as soon as
it encounters a segment with "use32" set. However, it
is sometimes useful to include 32-bit segments in
16-bit object files, as long as they don't contain any
fixups or offsets into other 32-bit segments.
I've attached a patch which switches the 32-bit format
determination from the segments to the fixups, so that
NASM makes a 16-bit OBJ files unless there are 32-bit
fixups or offsets present.
Since it's possible to link 16-bit OBJ files to a
32-bit program, that patch should not otherwise affect
anything, especially since just about all real 32-bit
segments will contain 32-bit fixups or offsets.
I need this because the program I'm writing must patch
a 32-bit program, but it must itself be a 16-bit
program, in this case linked by Borland's tlink.
gzipped output of diff -u for output/outobj.c