I assembled the following code:
.text
.global _start
_start:
mov r1, r1
b _start
.end
$ arm-wince-pe-as armtest.s -o armtest.o
$ arm-wince-pe-objdump -d armtest.o
armtest.o: file format pe-arm-little
Disassembly of section .text:
<_start>:
0: e1a01001mov r1, r1
4: ea00b 8 <_start+0x8>
GAS produces incorrect code for branches, at least sometimes. GDB for
arm-wince-pe says:
(gdb) disas _start
Dump of assembler code for function _start:
0x <_start+0>: mov r1, r1
0x0004 <_start+4>: b 0xc
I do not know why GAS and GDB disassemble code differently, but the real problem
is, that the branches are not working when I execute the code.
--
Summary: GAS assembles incorrect branches using target arm-wince-
pe
Product: binutils
Version: 2.17
Status: NEW
Severity: normal
Priority: P2
Component: gas
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: boris dot leidner at formenos dot de
CC: bug-binutils at gnu dot org
GCC host triplet: i686-linux
GCC target triplet: arm-wince-pe
http://sourceware.org/bugzilla/show_bug.cgi?id=3109
--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.
___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils