Re: [PATCH] Fix ELF entry point (i386)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gerd Hoffmann <[email protected]> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux