delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/24/16:55:06

From: ian AT cygnus DOT com
Subject: Re: Objdump stupidity
24 Oct 1997 16:55:06 -0700 :
Message-ID: <199710242140.RAA14998.cygnus.gnu-win32@tweedledumb.cygnus.com>
References: <199710241328 DOT OAA05644 AT propos DOT long DOT harlequin DOT co DOT uk>
To: jont AT harlequin DOT co DOT uk
Cc: gnu-win32 AT cygnus DOT com

[ You may get a faster response on general binutils issues if you send
  mail to the bug reporting address, bug-gnu-utils AT prep DOT ai DOT mit DOT 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
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
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019