mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Gerd Hoffmann <kraxel@suse.de>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix ELF entry point (i386)
Date: Mon, 06 Mar 2006 12:11:50 -0700	[thread overview]
Message-ID: <m1r75f8k21.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <440C363F.8000503@suse.de> (Gerd Hoffmann's message of "Mon, 06 Mar 2006 14:16:47 +0100")

Gerd Hoffmann <kraxel@suse.de> writes:

> Eric W. Biederman wrote:
>> 
>> We load the kernel at physical addresses and we enter
>> the kernel at a physical address.  Even the entry point
>> expects that.
>> 
>> Is there some reason you think the entry point is virtual?
>
> Elf specs say so.  The paragraph in question mentions processes not OS
> kernels though ...

The ELF spec only defines how ELF is interpreted for processes running under
an OS if I remember correctly.  Stand-alone executable that run without an
OS (like an OS kernel) play be slightly different rules, and I don't know if
anyone has ever formalized them.  As a consequence those rules like vary
between bootloaders and between architectures.

Currently my assumptions are:

Standalone executables load at the physical not the virtual addresses.
Standalone executables start executing at a physical address and not at
a virtual address.

In most cases virtual==physical in ELF binaries.  Which if you are throwing
something quick together means they will work in either circumstance.  Also
it is unfortunate that ld currently emits relocations for absolute symbols
in ET_DYN executables.

Of practical consequence currently /sbin/kexec makes the assumptions I have
outlined above.  So if you change that you not be able to boot vmlinx with
/sbin/kexec.

Eric

  reply	other threads:[~2006-03-06 19:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-22 11:09 Gerd Hoffmann
2006-03-05 16:34 ` Eric W. Biederman
2006-03-06 13:16   ` Gerd Hoffmann
2006-03-06 19:11     ` Eric W. Biederman [this message]
2006-03-07 13:41       ` Gerd Hoffmann
2006-03-07 17:55         ` Eric W. Biederman
2006-03-10  9:58           ` Gerd Hoffmann
2006-05-11 13:05           ` Gerd Hoffmann

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=m1r75f8k21.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=kraxel@suse.de \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®