2008-07-11 04:17:27

by Luke Dashjr

[permalink] [raw]
Subject: kernel_entry up front

I need to get kernel_entry to the lowest memory region in the binary. This is
because a platform I am porting to does not support ELF, and always begins
execution at the first word of the firmware image. Alternatively, if there is
a simpler way to prepend the image with a jump to the kernel_entry symbol,
that could work as well.

Thanks,

Luke


2008-07-11 10:32:18

by Will Newton

[permalink] [raw]
Subject: Re: kernel_entry up front

On Fri, Jul 11, 2008 at 5:08 AM, Luke -Jr <[email protected]> wrote:
> I need to get kernel_entry to the lowest memory region in the binary. This is
> because a platform I am porting to does not support ELF, and always begins
> execution at the first word of the firmware image. Alternatively, if there is
> a simpler way to prepend the image with a jump to the kernel_entry symbol,
> that could work as well.

The easiest way to do this is to put your entry point in a named
section (for example .text.head) then edit vmlinux.lds.S to put that
section at the correct place in your kernel image.