[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ld - ARM_COFF_BUGFIX needed for target arm-coff
From: |
john . smith |
Subject: |
ld - ARM_COFF_BUGFIX needed for target arm-coff |
Date: |
Mon, 25 Aug 2003 19:14:51 +0100 |
User-agent: |
Demon-WebMail/2.0 |
It is an old problem, but we tripped over it again recently.
It appears in binutils-030823.tar.bz2
The ARM_COFF_BUGFIX in bfd/coff-arm.c needs to be enabled for
target the arm-coff by changing bfd/config.bfd
from
arm-*-coff)
targ_defvec=armcoff_little_vec
targ_selvecs=armcoff_big_vec
targ_underscore=yes
;;
to
arm-*-coff)
targ_defvec=armcoff_little_vec
targ_selvecs=armcoff_big_vec
targ_underscore=yes
targ_cflags=-DARM_COFF_BUGFIX
;;
As a test case, assemble a file
.section text1
.global aa
mov r0,r0
aa:
mov r1,r1
.section text2
b aa
$ ./configure --target=arm-coff
$ make
$ make install
$ arm-coff-as -o a.o a.s
$ arm-coff-ld --entry=aa a.o -o a
$ arm-coff-objdump --disassemble-all a
..
.. stuff left out
..
Disassembly of section text1:
00040018 <text1>:
40018: e1a00000 nop (mov r0,r0)
0004001c <aa>:
4001c: e1a01001 mov r1, r1
Disassembly of section text2:
00040020 <text2>:
40020: eafffffc b 40018 <__end__>
Note that the bottom line is wrong.
After the change to bfd/config.bfd,
$ arm-coff-objdump --disassemble-all a
..
.. stuff left out
..
Disassembly of section text1:
00040018 <text1>:
40018: e1a00000 nop (mov r0,r0)
0004001c <aa>:
4001c: e1a01001 mov r1, r1
Disassembly of section text2:
00040020 <text2>:
40020: eafffffd b 4001c <aa>
Which is now correct.
Similarly, ARM_COFF_BUGFIX should be enabled for
strongarm-*-coff)
xscale-*-coff)
Is it required for thumb-*-coff) ? I don't know how to tell.
------------------------------------------------------------------------------
Repeating a simlar experiment for arm-aout using the assembler source
.text
.global aa
mov r0,r0
aa:
mov r1,r1
.data
b aa
gives, without ARM_COFF_BUGFIX
Disassembly of section .text:
00008000 <__stext_>:
8000: e1a00000 nop (mov r0,r0)
00008004 <aa>:
8004: e1a01001 mov r1, r1
8008: e1a00000 nop (mov r0,r0)
800c: e1a00000 nop (mov r0,r0)
...
Disassembly of section .data:
00010000 <__sdata_>:
10000: eaffe003 b 8014 <aa+0x10>
which is also wrong.
------------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ld - ARM_COFF_BUGFIX needed for target arm-coff,
john . smith <=