kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: mulyadi.santosa@gmail.com (Mulyadi Santosa)
To: kernelnewbies@lists.kernelnewbies.org
Subject: How vmlinux is recognized?
Date: Thu, 12 May 2011 03:21:12 +0700	[thread overview]
Message-ID: <BANLkTineK1CQrq4LZviWhp4aDhoPADkPaQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTik0X8g3YmonUbOvHF_SODqZTiocTA@mail.gmail.com>

On Thu, May 12, 2011 at 03:11, Vikram Narayanan <vikram186@gmail.com> wrote:
> Yes. I agree. But how who converts the ELF binary to raw binary so
> that the processor understands. Or how is it actually done?

OK I try my best to understand your question :)

i think I got it...you probably guessed that vmlinux created first,
then vmlinuz... AFAIK, it's the other way around...or more precisely,
not both.

After final phase of final kernel image creation, it will go into
making bootable image first. in order to do that, first it will be
compressed 1st. These days, gz is the choice.

So, it is gzipped..and the boot loading code is appended in front of
it... there, you get vmlinuz.

And vmlinux? developers usually use vmlinux as symbol file... and the
way it is created, back to the above phase, is by linking it according
to the accompanying elf linker script. Finally, ELF that contains
kernel is there.

Another guess, maybe you wanna know how to extract the kernel code
from ELF image? then why so? that is indeed the kernel image
itself...it is just appended ELF headers, sections and so on just to
represent ELF construction. But it is not behaving like standart ELF
binary i.e the entry point is not main() but IIRC start_kernel or
something like that.

that helps you?
-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

  reply	other threads:[~2011-05-11 20:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11 18:06 How vmlinux is recognized? Vikram Narayanan
2011-05-11 19:17 ` Dave Hylands
2011-05-11 19:31   ` Vikram Narayanan
2011-05-11 19:45     ` Mulyadi Santosa
2011-05-11 20:04       ` Vikram Narayanan
2011-05-11 20:09         ` Mulyadi Santosa
2011-05-11 20:11           ` Vikram Narayanan
2011-05-11 20:21             ` Mulyadi Santosa [this message]
2011-05-12  3:32               ` Vikram Narayanan
2011-05-12  4:32                 ` Sudheer Divakaran
2011-05-12  6:21                   ` Sudheer Divakaran
2011-05-12  7:26                     ` luca ellero
2011-05-12  8:17                 ` Mulyadi Santosa
2011-05-13  0:19                   ` Vikram Narayanan
2011-05-13  1:42                     ` Dave Hylands
2011-05-16  3:14                       ` Vikram Narayanan
2011-05-16  3:44                       ` Peter Teoh
2011-05-16 14:12                         ` Vikram Narayanan
2011-05-12  9:31                 ` अनुज
2011-05-11 20:33 ` Manohar Vanga
2011-05-12  3:34   ` Vikram Narayanan
2011-05-12 16:46   ` mindentropy

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=BANLkTineK1CQrq4LZviWhp4aDhoPADkPaQ@mail.gmail.com \
    --to=mulyadi.santosa@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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).