1

objdump won't show me the hex of a long 64 bit instruction.

objdump -d myobj.o

here is one of the lines:

3: 48 bb 2f 2f 62 69 6e movabs $0x68732f6e69622f2f,%rbx

the instruction hex cuts off after the first 7 bytes of the mov instruction, even though there are 8 bytes in the operand.

What I want it to show would be:

3: 48 bb 2f 2f 62 69 6e 2f 73 68 movabs $0x68732f6e69622f2f,%rbx

I know that its easy to deduce the rest of the hex by looking at the actual instruction, but I just want to know how can I get it to show all of the hex?

Harry
  • 13

1 Answers1

2

the objdump manpage says to use --insn-width:

$ objdump -d a.out | grep movabs
  40053e:   48 b8 45 23 12 90 78    movabs $0x1234567890122345,%rax
  40054c:   48 b8 45 33 12 90 73    movabs $0x1334567390123345,%rax

$ objdump --insn-width=10 -d a.out | grep movabs
  40053e:   48 b8 45 23 12 90 78 56 34 12   movabs $0x1234567890122345,%rax
  40054c:   48 b8 45 33 12 90 73 56 34 13   movabs $0x1334567390123345,%rax