Received: from eggs.gnu.org ([2001:4830:134:3::10]:55856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6IOz-0004Pe-Qw for qemu-devel@nongnu.org; Fri, 27 May 2016 10:06:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6IOx-0004XK-OY for qemu-devel@nongnu.org; Fri, 27 May 2016 10:06:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6IOx-0004XB-J5 for qemu-devel@nongnu.org; Fri, 27 May 2016 10:06:11 -0400 References: <1464343604-517-1-git-send-email-pbonzini@redhat.com> <20160527133858.GR1683@redhat.com> From: Paolo Bonzini Message-ID: <35260c01-fb02-989e-f855-08591dbee9bf@redhat.com> Date: Fri, 27 May 2016 16:06:07 +0200 MIME-Version: 1.0 In-Reply-To: <20160527133858.GR1683@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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: "Richard W.M. Jones" , Peter Maydell Cc: QEMU Developers , =?UTF-8?Q?Marc_Mar=c3=ad?= 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. >=20 > Rich. >=20 > diff --git a/pc-bios/optionrom/linuxboot_dma.c b/pc-bios/optionrom/linu= xboot_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; > } > =20 > +/* 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 =3D i386pe +CFLAGS +=3D -Wa,-32 else LD_EMULATION =3D elf_i386 endif to work around what is likely a GCC bug. Paolo