On 20/07/15 15:09, Andrew Jones wrote: > On Mon, Jul 20, 2015 at 08:47:53AM +0200, Thomas Huth wrote: ... >> ... or you could try to get the elf_reloc code working for POWER, too >> (see include/hw/elf_ops.h). That way QEMU would take care of relocating >> your program. (you can peek at elf_apply_rela64() in >> https://github.com/aik/SLOF/blob/master/lib/libelf/elf64.c >> if you want to know what basically has to be done for POWER relocations). > > kvm-unit-tests doesn't load the unit test elf itself. It relies on QEMU's > -kernel parameter to get the "kernel" (the unit test) into memory.
I was talking about the -kernel parameter of QEMU. That triggers the load_elf() function of QEMU - and this function can provide ELF relocation, too. It is used for s390x already to relocate the firmware there, so I think it could be done for ppc64, too. Thomas