This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: objdump x86
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Xin Tong <trent dot tong at gmail dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Wed, 11 Dec 2013 03:39:51 -0800
- Subject: Re: objdump x86
- Authentication-results: sourceware.org; auth=none
- References: <CA+JLOiuVu9+y1476HEJoJgzusKkq-OLWNtXN5qae6gOrAVmc2A at mail dot gmail dot com>
On Wed, Dec 11, 2013 at 12:29 AM, Xin Tong <trent.tong@gmail.com> wrote:
> I am wondering how objdump can statically dump x86 executable. X86
> features a variable length instruction set and i was told there is no
> reliable way to disassemble x86 executable statically ( as data and
> instruction can be intermixed). How does objdump do it ?
objdump dissambles x86 binary byte by byte, following the x86 encoding
rules. If you mix data and text, disassembler will get confused and
generate garbage.
--
H.J.