[Skiboot] [PATCH] Load ELF64 binaries correctly

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Jan 23 04:02:05 AEDT 2015


On Wed, 2015-01-21 at 08:45 -0800, Nathan Whitehorn wrote:
> The attached patch fixes the big-endian ELF64 loader in skiboot to 
> handle the fact that the ELF entry point is specified to point to a 
> function descriptor describing the entry point rather than the entry 
> point itself. (I haven't set it up to load the TOC base pointer though) 
> This is required to load the FreeBSD kernel as a skiboot payload. The 
> patch does not touch the little-endian loader since I'm not sure if the 
> ELFv2 spec still has function descriptors or not.

An additional problem is that the Linux 64-bit BE kernel vmlinux doesn't
have a correct function descriptor as an entry point :-( So that patch
breaks loading a raw BE vmlinux... We probably need a quirk to recognize
such an image, possibly via the fact that the value that would be in the
function descriptor cannot possibly be a valid entry point as part of
the image.

As for LE, there are no descriptors.

Cheers,
Ben.

> -Nathan
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot




More information about the Skiboot mailing list