qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 00/31] Misc changes for 2016-05-27


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PULL 00/31] Misc changes for 2016-05-27
Date: Fri, 27 May 2016 16:06:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0


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.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]