------- Additional Comments From chris at seberino dot org 2009-11-14 23:38 ------- Subject: Re: Bug in objdump when disassembling raw armv4t binaries
On Wed, Nov 11, 2009 at 09:54:45AM -0000, nickc at redhat dot com wrote: > I have checked the patch in, but I will leave this issue open for reports of > other UNPREDICTABLE bit patterns. Nick OK I tried to find all bugs I could in one pass to make your job easier. Regarding me helping with writing patches, I'll do it if I need to but it is enough work just to inspect all this output to find the bugs in the first place. I'd be afraid of making a mistake. Is there a specific file you could point me to where all this parsing takes place? I'll have a look. I assume have unit tests you run your patches through so we know we aren't adding new bugs as we fix existing ones? And, I assume you are testing what I say against the ARM manual so that *I* don't introduce a bug? ... Here is what I found recently. BTW, when I give you an example of a bug, it is most likely found in other instructions. I'm hoping that your fix ends up eliminating the whole *class* of bugs. For example, that last undefined bug regarding P=0 and W=1 was reported for a store. It also shows up in ldrsb and ldrh. I hope you patch nailed those too? Without further ado.... 0x004000b0 strheq r0, [r0], #-0 <--- objdump is missing the "#-0" (see ARM-ARM top of A5-45) 0x004f00b1 strheq r0, [pc], #-1 <--- objdump has r0, [pc, #-1] 0x005fffff ldrsheq pc, [pc], #-255 <--- objdump has pc, [pc, #-255] 0x00500090 <-- should be undefined not ldrbeq 0x006fffbf <-- P=0 so can't be right 0x00700090 bit 26 is zero so can't be ldrbeq...I think it is undefined 0x007fffff ldrsheq pc, [pc, #-255]! <-- objdump is missing the "!" since bit 21=1 0x00cf00b0 strheq r0, [pc], #0 <--- objdump has r0, [pc, #0] (bit24=0) (likewise for 0x00df00b0 and 0x00dfffff) 0x00ffffff ldrsheq pc, [pc, #255] <-- can't be right since P=0 0x0100f000 <-- obdjump say this is a tstpeq....What is tstp? No such thing! 0x01100090 <-- Can't be ldrbeq since bit26 is zero. I think is undefined 0x0120f096 <-- objdump has "<illegal shifter operand>". That should be fixed. 0x01300090 <--Can't be ldrbeq since bit26 =0. I think is undefined. 0x01400000 <-- Should be mrseq not cmpeq since bit 20=0 0x016000b0 strheq r0, [r0, #-0]! <-- objdump has r0, [r0]! which is wrong cs -- http://sourceware.org/bugzilla/show_bug.cgi?id=10924 ------- 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