Port-arm archive

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

Re: Kernel ELF entry point



Unfortunately NetBSD kernel build infrastructure can't differentiate
kernel configuration from how it's loaded (load address, entry
address).  Consequently you have to use workarounds, not a solution.

I'm wondering that kernel should be always provided as a relocatable,
so that it can be linked against different load addresses.  I've
received only negative reactions, though.

On Mon, Nov 10, 2014 at 8:00 AM, fzort <fzorto%gmail.com@localhost> wrote:
> Hello,
>
> I've been playing a bit with NetBSD/evbarm on qemu (integratorcp) to
> get my feet wet.
>
> I noticed is the entry point address in the kernel ELF binary seems to
> be incorrect. Even though the linker script has the line
> ENTRY(KERNEL_BASE_phys), it gets overridden by the "-e start"
> command-line option added by Makefile.kern.inc:
>
> $ arm--netbsdelf-eabi-readelf -h netbsd | grep Entry
>   Entry point address:               0xc010015c
>
> This is causing some problems when trying to run the kernel in qemu
> with the -kernel command-line option.
>
> I got around this problem by adding the following line to mk.integrator_cp:
>
> ENTRYPOINT = ${KERNEL_BASE_PHYS}
>
> Is there a better solution?
>
> Thanks for reading.


Home | Main Index | Thread Index | Old Index