mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Horst von Brand <vonbrand@inf.utfsm.cl>
To: Russ Weight <rweight@us.ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Disassemble vmlinuz (i386)
Date: Mon, 22 Mar 2004 14:21:12 -0400	[thread overview]
Message-ID: <200403221821.i2MILCox004241@eeyore.valparaiso.cl> (raw)
In-Reply-To: Your message of "Mon, 22 Mar 2004 09:58:07 PST." <20040322175807.GA22404@us.ibm.com>

Russ Weight <rweight@us.ibm.com> said:
> 	Admittedly, you would have to be pretty desparate to want
> to disassemble vmlinuz... but I was... and I did.  There may
> be other (better?) ways to do this, but since I didn't find
> a complete recipe for this in my web searches, I'll post what
> I did in case it might be helpful to others.

When I needed to do stuff like this, I went back to the vmlinux
(uncompressed) which was lying around in the build directory. Or even to
the individual .o files.

> 	Note that this was done on a 2.4.9 kernel.
> 
> - Russ
> 
> 
> The short version:
> ==================
> (1) Strip the header and decompress the kernel

Or grab the uncompressed version (if available).

> (2) Write a small C program to copy the decompressed kernel
>     into a shared memory segment.

Placing it into a file and objdump(1) should give most of what you are
after... and you might also start gdb(1) on the file. Dunno if the weird
startup code/placement messes it up, but worth a try.

> (3) Run the C program under gdb - stop at a breakpoint after the
>     copy and then use the gdb "disassemble" command to disassemble
> 	the kernel from shared memory.
> (4) Clean up the addresses. If you pick a good virtual address
>     for the shared memory segment, then the cleanup can be a fairly
> 	simple search & replace.

May I ask what you were after?
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

  reply	other threads:[~2004-03-22 18:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-22 17:58 Russ Weight
2004-03-22 18:21 ` Horst von Brand [this message]
2004-03-22 19:18   ` Russ Weight
2004-03-22 20:21     ` Jan-Benedict Glaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200403221821.i2MILCox004241@eeyore.valparaiso.cl \
    --to=vonbrand@inf.utfsm.cl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rweight@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®