www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - coff2omf.exe produces wrong omf file - example.zip

coff2omf.exe produce omf file from coff input with some mistakes
I attached an example, where it is very clear to see.

Here the disassempled input from original (coff) obj file

text:00000000                 public _zxfft_bitrev
text:00000000 _zxfft_bitrev   proc near               ; C
text:00000000
..
text:00000022                 xor     edx, edx
text:00000024                 mov     dl, ds:$L1227[eax]
text:0000002A                 jmp     ds:$L1228[edx*4]
text:00000031 $L971:
..
text:0000003A $L973:
..
text:0000013A $L1228          dd offset $L971         ; DATA
text:0000013E                 dd offset $L973
text:00000142                 dd offset $L975
text:00000146                 dd offset $L977
text:0000014A                 dd offset $L979
text:0000014E                 dd offset $L981
text:00000152                 dd offset $L983
;
text:00000156 $L1227          db 0, 7 dup(6), 1, 0Fh dup(6) ;
text:00000156                 db 2, 1Fh dup(6), 3, 3Fh dup(6)
text:00000156                 db 4, 7Fh dup(6), 5

==================================================================
The result of conversion to Omf is totally wrong!!!

_TEXT:00000010                 public _zxfft_bitrev
_TEXT:00000010 _zxfft_bitrev   proc near
..
_TEXT:00000032                 xor     edx, edx
_TEXT:00000034                 mov     dl, byte ptr ds:_zxfft_bitrev[eax]
_TEXT:0000003A                 jmp     dword ptr ds:_zxfft_bitrev[edx*4]
..
_TEXT:0000014A                 dd offset _zxfft_bitrev
_TEXT:0000014E                 dd offset _zxfft_bitrev
_TEXT:00000152                 dd offset _zxfft_bitrev
_TEXT:00000156                 dd offset _zxfft_bitrev
_TEXT:0000015A                 dd offset _zxfft_bitrev
_TEXT:0000015E                 dd offset _zxfft_bitrev
_TEXT:00000162                 dd offset _zxfft_bitrev
_TEXT:00000166                 db 0, 7 dup(6), 1, 0Fh dup(6)
_TEXT:00000166                 db 2, 1Fh dup(6), 3, 3Fh dup(6)
_TEXT:00000166                 db 4, 7Fh dup(6), 5


Regards
Dmitry
Sep 08 2005