qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6] Add optionrom compatible with fw_cfg DMA ver


From: Laszlo Ersek
Subject: Re: [Qemu-devel] [PATCH v6] Add optionrom compatible with fw_cfg DMA version
Date: Mon, 9 May 2016 23:16:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0

On 05/09/16 18:48, Richard W.M. Jones wrote:
> 
> Actually there's a rather more fundamental problem.  In the current
> linuxboot_dma.c we use asm statements at the top and bottom of the
> file (outside any function).  The asm statements define the header and
> what I assume is the footer of the file.  At any rate, they encode the
> size of the file (the calculation `.byte (_end - _start) / 512').
> 
> Clang just rearranges everything in the file, so the _start and _end
> asm snippets appear together at the beginning of the input to the
> assembler, and nothing works after that.
> 
> So that pretty much screws up the whole project of trying to write an
> option ROM in C.
> 
> Of course we're well outside any standards here.  Can we tell clang
> users to use the GCC/pre-compiled option ROMs :-?  Any other ideas?  I
> don't think I've missed a flag (GCC has -fno-toplevel-reorder, but
> clang 3.8 doesn't ...)

IIRC for a while we used to ship pre-compiled ACPI byte-code, for people
who didn't have "iasl" installed.

We could make this C source file gcc-only, and provide a pre-compiled
assembly source file for those platforms that only have clang.

Laszlo



reply via email to

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