OMF: Incorrect handling of COMMON segs.
Brought to you by:
japheth
Here is a small program that shows the problem:
.486P
.model flat,syscall
.code
begin:
lea eax,stuf
int 13
_stuf segment dword common '_stuf' ;
stuf equ $
dd 0
_stuf ends
end begin
This type of code works on OS/2 using ALP but not JWASM. (I don't have MASM to test with just now.)
I'm attaching the listings and object dumps. You can see that the fixups are different.
Oops -- apparently sourceforge only let's me add one file. continued on next bug.
I tried with jwasm and cannot see the problem. jwasm creates a 32-bit fixup, while Masm creates a 16-bit one, but IMO this is more likely to be a Masm bug. From the listing I cannot ree what kind of fixup ALP creates.
I checked the sample with Masm v8, and this version creates the very same fixup as jwasm. Hence the 16-bit fixup created by Masm v6 WAS a bug.