[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnu assembler 2.14
From: |
Welzel, Rainer |
Subject: |
gnu assembler 2.14 |
Date: |
Wed, 24 Mar 2004 13:14:25 +0100 |
Hi,
there is an error by the replacement of an external label.
In the sample below, the declared label IOK_BIT_RESULT
is replaced only with the base address IO_KOMM, missing
the offset +2.
facts:
cross assembler: gas 2.14 m68k-aout
OS: Solaris 8 (5.8)
-- -------------------------------------------------------------------------
---------
Code:
.extern IO_KOMM
.EQU IOK_ERROR,IO_KOMM+0
.EQU IOK_BIT_RESULT,(IO_KOMM+2)
LOCVAR: .WORD 1122
.WORD 3344
.EQU LOC2,(LOCVAR+2)
.text
start:
MOVE.L (IO_KOMM),D1 | OK
MOVE.L (IO_KOMM+2),D1 | OK
MOVE.L (IOK_BIT_RESULT),D1 | Fehler: IO_KOMM
MOVE.L (LOCVAR),D1 | OK
MOVE.L (LOCVAR+2),D1 | OK
MOV.L (LOC2),D1 | OK
.end
-- -------------------------------------------------------------------------
---------
command: gas -m68020 -o do_equ_test.o -a=do_equ_test.lst do_equ_test
-- -------------------------------------------------------------------------
---------
Listfile:
68K GAS do_equ_test page 1
1 .extern IO_KOMM
2
3 .EQU IOK_ERROR,IO_KOMM+0
4 .EQU IOK_BIT_RESULT,(IO_KOMM+2)
5
6 0000 0462 LOCVAR: .WORD 1122
7 0002 0D10 .WORD 3344
8 .EQU LOC2,(LOCVAR+2)
9
10 .text
11
12 start:
13 0004 2239 0000 MOVE.L (IO_KOMM),D1
| OK
13 0000
14 000a 2239 0000 MOVE.L (IO_KOMM+2),D1
| OK
14 0002
15 0010 2239 0000 MOVE.L (IOK_BIT_RESULT),D1
| Fehler: IO_KOMM
15 0000
16
17 0016 223A FFE8 MOVE.L (LOCVAR),D1
| OK
18 001a 223A FFE6 MOVE.L (LOCVAR+2),D1
| OK
19 001e 2239 0000 MOV.L (LOC2),D1
| OK
19 0002
20
21 .end
-- -------------------------------------------------------------------------
---------
!!! on line 15 I expected an offset 0002 like line 14 !!!
best reguards
Rainer Welzel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnu assembler 2.14,
Welzel, Rainer <=