#621742 Allow loading elf64 binaries in multiboot format

Package:
qemu-kvm
Source:
qemu
Submitter:
Goswin von Brederlow
Date:
2025-07-28 19:57:09 UTC
Severity:
wishlist
#621742#5
Date:
2011-04-08 13:47:23 UTC
From:
To:
Hi,

thanks to multiboot specs and many examples on the internet building
your own toy kernel is quite simple. In 32bit that is. Building a
64bit kernel suddenly becomes quite complicated as one can't compile
64bit C code into a 32bit elf format as required by kvm. One can't
link 64bit object files together with a 32bit object containing
startup code either. So one needs to mangle stuff around to fit
loosing symbol information and debug functionality. Overall not a
satisfactory thing.

Luckily kvm allready knows all about loading a elf64 binary and it is
simple to create a little 32bit asm startup code in elf64 format as
entry point for the bootloader. All that is required for kvm to
support this is not to reject the elf64 format. Patch attached.

MfG
	Goswin