This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
patch to arm disassembler - fixes double dumping of thumb raw insns...
- To: binutils at sourceware dot cygnus dot com, tdel at mail dot wrs dot com
- Subject: patch to arm disassembler - fixes double dumping of thumb raw insns...
- From: Thomas de Lellis <tdel at windriver dot com>
- Date: Mon, 24 Jan 2000 17:50:19 -0800
The arm/thumb disassembler was dumping extraneous raw opcode info
when disassembling thumb instructions. See below: opcode dump
repeated for thumb instructions in the FAIL example.
======================================================================
2000-01-24 Thomas de Lellis <tdel@windriver.com>
* arm-dis.c (printf_insn_thumb): Prevent double dumping
of raw thumb instructions.
======================================================================
*** arm-dis.c@@/main/3 Mon Oct 4 14:39:32 1999
--- arm-dis.c Mon Jan 24 15:47:14 2000
*************** print_insn_thumb (pc, info, given)
*** 578,584 ****
info->bytes_per_line = 4;
given &= 0xffff;
! func (stream, "%04x\t", given);
for (; *c; c++)
{
--- 578,583 ----
info->bytes_per_line = 4;
given &= 0xffff;
for (; *c; c++)
{
======================================================================
TESTCASE
>cat aa.s
.code 32
.balign 4
armFunc:
nop
nop
.code 16
.balign 4
.thumb_func
thumbFunc1:
NOP
NOP
FAIL =================================================================
> ./test
+ asthumb -o aa.o aa.s
+ ldthumb -o a.o aa.o
ldthumb: warning: cannot find entry symbol _start; defaulting to 00008000
+ objdumpthumb -d a.o
a.o: file format elf32-littlearm
Disassembly of section .text:
00008000 <armFunc>:
8000: e1a00000 nop (mov r0,r0)
8004: e1a00000 nop (mov r0,r0)
00008008 <thumbFunc1>:
8008: 46c0 46c0 nop (mov r8,r8)
800a: 46c0 46c0 nop (mov r8,r8)
PASS ======================================================================
> ./test
+ asthumb -o aa.o aa.s
+ ldthumb -o a.o aa.o
ldthumb: warning: cannot find entry symbol _start; defaulting to 00008000
+ objdumpthumb -d a.o
a.o: file format elf32-littlearm
Disassembly of section .text:
00008000 <armFunc>:
8000: e1a00000 nop (mov r0,r0)
8004: e1a00000 nop (mov r0,r0)
00008008 <thumbFunc1>:
8008: 46c0 nop (mov r8,r8)
800a: 46c0 nop (mov r8,r8)