Subject: Re: Objdump stupidity
From: [email-masked]

24 Oct 1997 16:55:06 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
To: [email-masked]
Cc: [email-masked]

[ You may get a faster response on general binutils issues if you send
  mail to the bug reporting address, [email-masked].
  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
disassemble_bytes.

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

Ian
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".