Help! Bug in GAS in MRI mode? (--target=m68k-coff)

Serge Nikulin nikulin@actsw.amat.com
Thu Jul 20 09:07:00 GMT 2000
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





More information about the Binutils mailing list