linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: linuxppc-dev@ozlabs.org, lkml <linux-kernel@vger.kernel.org>
Subject: Difference between vmlinux and vmlinux.bin
Date: Tue, 19 Feb 2008 16:51:46 -0600	[thread overview]
Message-ID: <47BB5D82.6070806@freescale.com> (raw)

I'm trying to write an ELF loader for a PowerPC vmlinux, and I've come across 
something I don't understand.

In vmlinux, there are two Program Segments, the first of which is PT_LOAD.  What 
is the difference between the block of data inside this section, and 
vmlinux.bin?  I thought that vmlinux.bin is nothing more than the PT_LOAD 
section of vmlinux.  However, when I do a memcmp, there is a difference at 
offset 3080192 (vmlinux.bin is 4874532 bytes long):

memcmp @ 3080192 125 != 31
32 bytes @ 412f0000:

7d 20 00 28 31 29 ff ff 7d 20 01 2d 40 a2 ff f4
2f 89 00 00 41 9e 01 9c 7f e3 fb 78 4b d7 b0 75
32 bytes @ 42300000:

1f 8b 08 08 b7 e7 7a 44 00 03 62 75 73 79 62 6f
78 2d 31 2e 31 2e 33 2e 69 6d 67 00 ec 5d 7d 74

So when Kbuild creates vmlinux.bin, what does it do besides extract the PT_LOAD 
segment?

-- 
Timur Tabi
Linux kernel developer at Freescale

             reply	other threads:[~2008-02-19 22:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19 22:51 Timur Tabi [this message]
2008-02-19 23:11 ` Difference between vmlinux and vmlinux.bin Timur Tabi

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=47BB5D82.6070806@freescale.com \
    --to=timur@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).