From: "Richard W.M. Jones" <rjones@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
"Marc Marí" <marc.mari.barcelo@gmail.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Laszlo Ersek" <lersek@redhat.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v6] Add optionrom compatible with fw_cfg DMA version
Date: Mon, 9 May 2016 17:48:14 +0100 [thread overview]
Message-ID: <20160509164814.GS1683@redhat.com> (raw)
In-Reply-To: <CAJSP0QU6reLA6VR6yFk25dWpg4ConQ-YhkYOeGH+VhPpbySaoA@mail.gmail.com>
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
next prev parent reply other threads:[~2016-05-09 16:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 16:04 [Qemu-devel] [PATCH v6] Add optionrom compatible with fw_cfg DMA version Richard W.M. Jones
2016-04-25 16:04 ` Richard W.M. Jones
2016-05-08 18:57 ` Marc Marí
2016-04-26 9:59 ` Stefan Hajnoczi
2016-05-09 13:24 ` Stefan Hajnoczi
2016-05-09 15:31 ` Stefan Hajnoczi
2016-05-09 16:12 ` Richard W.M. Jones
2016-05-09 16:48 ` Richard W.M. Jones [this message]
2016-05-09 21:16 ` Laszlo Ersek
2016-05-09 21:37 ` Richard W.M. Jones
2016-05-10 17:19 ` Paolo Bonzini
2016-05-10 17:24 ` Paolo Bonzini
2016-05-10 17:36 ` Richard W.M. Jones
2016-05-10 19:00 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160509164814.GS1683@redhat.com \
--to=rjones@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kraxel@redhat.com \
--cc=lersek@redhat.com \
--cc=marc.mari.barcelo@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=stefanha@gmail.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).