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: Richard W.M. Jones
Subject: Re: [Qemu-devel] [PATCH v6] Add optionrom compatible with fw_cfg DMA version
Date: Mon, 9 May 2016 17:48:14 +0100
User-agent: Mutt/1.5.20 (2009-12-10)

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 ...)

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



reply via email to

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