From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6ITs-0000j7-TZ for qemu-devel@nongnu.org; Fri, 27 May 2016 10:11:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6ITl-00063S-NA for qemu-devel@nongnu.org; Fri, 27 May 2016 10:11:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6ITl-00063N-Hf for qemu-devel@nongnu.org; Fri, 27 May 2016 10:11:09 -0400 Date: Fri, 27 May 2016 15:11:07 +0100 From: "Richard W.M. Jones" Message-ID: <20160527141107.GS1683@redhat.com> References: <1464343604-517-1-git-send-email-pbonzini@redhat.com> <20160527133858.GR1683@redhat.com> <35260c01-fb02-989e-f855-08591dbee9bf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <35260c01-fb02-989e-f855-08591dbee9bf@redhat.com> Subject: Re: [Qemu-devel] [PULL 00/31] Misc changes for 2016-05-27 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , QEMU Developers , Marc =?iso-8859-1?Q?Mar=ED?= On Fri, May 27, 2016 at 04:06:07PM +0200, Paolo Bonzini wrote: > > > On 27/05/2016 15:38, Richard W.M. Jones wrote: > > One way to solve this (which works for me) is as below. There are > > some other approaches, eg. using -fno-leading-underscore, or using a > > conditional macro to mangle the name. However I have no idea if there > > is some preferred way. > > > > Rich. > > > > diff --git a/pc-bios/optionrom/linuxboot_dma.c b/pc-bios/optionrom/linuxboot_dma.c > > index 86ef1ce..8509b28 100644 > > --- a/pc-bios/optionrom/linuxboot_dma.c > > +++ b/pc-bios/optionrom/linuxboot_dma.c > > @@ -213,6 +213,9 @@ static uint32_t get_e801_addr(void) > > return ret; > > } > > > > +/* Force the asm name without leading underscore, even on Win32. */ > > +extern void load_kernel(void) asm("load_kernel"); > > + > > void load_kernel(void) > > { > > void *setup_addr; > > Yes, that's what I wanted to do. I also need > > diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile > index 2b11cd3..14e7f71 100644 > --- a/pc-bios/optionrom/Makefile > +++ b/pc-bios/optionrom/Makefile > @@ -31,6 +31,7 @@ build-all: multiboot.bin linuxboot.bin > linuxboot_dma.bin kvmvapic.bin > > ifdef CONFIG_WIN32 > LD_EMULATION = i386pe > +CFLAGS += -Wa,-32 > else > LD_EMULATION = elf_i386 > endif > > to work around what is likely a GCC bug. OK I don't need that with mingw32-gcc-6.1.0-1.fc24.x86_64, but on the other hand it doesn't negatively affect builds for me either. Next version coming up soon. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v