Objdump stupidity

ian@cygnus.com ian@cygnus.com
Fri Oct 24 14:41:00 GMT 1997

[ You may get a faster response on general binutils issues if you send
  mail to the bug reporting address, bug-gnu-utils@prep.ai.mit.edu.
  Of course, it can be hard to tell whether a particular issue is
  cygwin32 specific or general. ]

>Why does objdump engage in the following stupid behaviour when
>disassembling? For some reason, it's decided to continue disassembly
>from the middle of an opcode, which has forced it to produce the '%?'

>100015f1 <.lf>:
>     0:	bb a0 81 00 10 	movl   $0x100081a0,%ebx
>     5:	ff 53 04       	call   *0x4(%ebx)
>     8:	89 45 f8       	movl   %eax,0xfffffff8(%ebp)
>     b:	ff 75 f8       	pushl  0xfffffff8(%ebp)
>     e:	8b 05 8c b3 00 	movl   0x1000b38c,%eax
>    13:	10 

>10001601 <.lf>:
>     0:	8c b3 00 10 b9 	movw   %?,0x2b91000(%ebx)
>     5:	02 
>     6:	00 00          	addb   %al,(%eax)
>     8:	00 8b 1d 8c b4 	addb   %cl,0xb48c1d(%ebx)

You didn't include a test case, and I don't know specifically why it
is failing for you.

The general answer is that objdump looks for symbols which it believes
represent functions, and restarts the disassembly each time it finds
one.  You have a couple of symbols named .lf which objdump thinks are
functions.  You can see this happening in objdump.c in
disassemble_data, near the end, where it sets nextstop before calling

The quick way to get a disassembly is to use --prefix-addresses, which
uses a different disassembly format.

For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

More information about the Cygwin mailing list