This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi all,
I found some problem with disassembler for Thumb(ARM) processor. Here I am giving the input file and its disassembed output. contents of input file
(trail_zero.s)is:
---------------------------------------------------------- .text lsl r6, r0, #4 ;some instruction lsl r5, r0, #6 ;some instruction .byte 0x08 .data .byte 0x00 .byte 0x00 .byte 0x00 ------------------------------------------------------------- output (trail_zero.out) is assembled with ./arm-elf-as.exe -mthumb -a trail_zero.s -o trail_zero.out output of disassembler is: (./arm-elf-objdump.exe -D -disassembler-options=force-thumb trail_zero.out) -------------------------------------------------------------- trail_zero.out: file format elf32-littlearm Disassembly of section
.text:
00000000
<.text>:
0: 0106 lsl r6, r0, #4 2: 0185 lsl r5, r0, #6 4: Address 0x4 is out of bounds. Disassembly of section
.data:
00000000
<.data>:
0: 0000 lsl r0, r0, #0 ... -------------------------------------------------------------- There is a problem in disassembler in
handling the trailing byte for an odd sized section.
If it is non-zero ( as in text section )it gives "Address 0x4 is out of bounds" message. and if it zero (like in data section) it simply replaces it with "...", instead of displaying it as '0x00'. Another example:
input file: ------------------------------------------------------------------ .text lsl r6, r0, #4 ;some instruction lsl r7, r0, #5 ;some instruction lsl r0, r0, #0 .data .byte 0x00 .byte 0x00 .byte 0x00 -------------------------------------------------------------------- trail_zero.out: file format elf32-littlearm Disassembly of section
.text:
00000000
<.text>:
0: 0601 lsl r6, r0, #4 2: 4701 lsl r7, r0, #5 ... Disassembly of section .data: 00000000
<.data>:
0: 0000 lsl r0, r0, #0 ... ---------------------------------------------------------------------- Here instead of disassembling the last instruction in text section it is replaced with "...", because its opcode is "0x0000". I think it is a bug in disassembler (objdump.c) for thumb(arm). Could anybody please verify this. If it is a bug,please suggest any probable solution. Thanks in
advance.
Regards, Subhash Verma |
Attachment:
InterScan_Disclaimer.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |