From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHRol-0000Xe-5k for qemu-devel@nongnu.org; Tue, 21 Jul 2015 03:18:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHRoh-0001Cj-TC for qemu-devel@nongnu.org; Tue, 21 Jul 2015 03:18:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHRoh-0001CA-Na for qemu-devel@nongnu.org; Tue, 21 Jul 2015 03:18:19 -0400 Message-ID: <55ADF074.6000606@redhat.com> Date: Tue, 21 Jul 2015 09:10:44 +0200 From: Thomas Huth MIME-Version: 1.0 References: <1437134200-13086-1-git-send-email-drjones@redhat.com> <1437134200-13086-3-git-send-email-drjones@redhat.com> <20150720050105.GF19189@voom.fritz.box> <55AC9999.9050506@redhat.com> <20150720130920.GA29546@hawk.localdomain> In-Reply-To: <20150720130920.GA29546@hawk.localdomain> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 2/2] spapr: -kernel: allow linking with specified addr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Jones Cc: dgibson@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, David Gibson 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