This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Help! Bug in GAS in MRI mode? (--target=m68k-coff)
- Subject: Help! Bug in GAS in MRI mode? (--target=m68k-coff)
- From: "Serge Nikulin" <nikulin at actsw dot amat dot com>
- Date: Thu, 20 Jul 2000 09:06:27 -0700
- Cc: <binutils at sourceware dot cygnus dot com>
Hi, All
Looks like I get stuck again with my MRI->GNU project.
All our legacy assembler code was assembled incorrectly with GAS.
I could not find any appropriate switch in info/man pages.
Can you help me, please?
The problem is that GAS incorrectly aligns 1-byte offsets.
Looks like it just ignores them.
By assembling the following example code (m68k-coff-as -M test.asm -as):
OFFSET 0
UCBINIT DS.B 1
UCBSIZ DS.W 1
END
I get:
...
absolute:00000000 UCBINIT
absolute:00000000 UCBSIZ (SN: wrong zero offset!)
...
----------
Note the offset of UCBSIZ filed? It should be 2.
Compare, pls, with Greenhill (Oasys) and MRI assemblers:
MRI (asm68k -l test.asm):
...
Label Value
UCBINIT 00000000
UCBSIZ 00000002 (SN: right)
...
------------
Greenhill:
1 00000000 OFFSET 0
2 00000000 UCBINIT DS.B 1
3 00000002 UCBSIZ DS.W 1 (SN: right)
4 END
---------------
I could fix it by manual alligning:
OFFSET 0
UCBINIT DS.B 1
__ALIGN DS.B 1
UCBSIZ DS.W 1
END
Unfortunately I can not do this -- our legacy sources are too large and
murky.
Any help would be greatly appreciated.
Thank you,
Serge