Re: [Bug gas/3109] New: GAS assembles incorrect branches using target arm-wince-pe

2006-08-23 Thread Nick Clifton

Hi Boris,


$ arm-wince-pe-objdump -d armtest.o


This is insufficient.  Please add the "-r" switch to the objdump command 
line.



 <_start>:
   0:   e1a01001mov r1, r1
   4:   ea00b   8 <_start+0x8>


The -r switch should show you that there is a relocation for the 
instruction at address 0x4, hence the disassembly is showing you an 
incomplete instruction.  (It would be better to run objdump on the fully 
linked executable, rather than the object file, as that way you do not 
have to worry about relocations).



(gdb) disas _start
Dump of assembler code for function _start:
0x <_start+0>:  mov r1, r1
0x0004 <_start+4>:  b   0xc


How did you create the file that you gave to GDB ?

Please try the latest sources in the binutils repository.  I believe 
that you will find that this bug has now been fixed.


Cheers
  Nick





___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/3109] New: GAS assembles incorrect branches using target arm-wince-pe

2006-08-23 Thread boris dot leidner at formenos dot de
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