In 64 bit code, objdump misunderstands the pushw immediate instruction. I
believe the disassembly for this example should be: "pushw $0x2222", followed by
whatever junk for the 0xaa and 0xbb bytes. The disassembler is eating two extra
bytes and displaying a 64 bit value instead of a 16 bit one.
example:
$ cat pushw.s
.text
pushw $0x2222
.byte 0xaa
.byte 0xbb
$ as -o pushw.o pushw.s
$ objdump -d pushw.o
pushw.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <.text>:
0: 66 68 22 22 aa bb pushw $0xffffffffbbaa2222
$
I found the same behavior with these versions:
2.19.51.0.14-3.fc11 20090722
2.20.1.20100303
--
Summary: objdump gets the wrong length for pushw immediate in 64
bit mode
Product: binutils
Version: 2.20
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: alex at cloudswitch dot com
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11960
------- 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
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-binutils