[Top][All Lists]

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

Re: [Qemu-devel] [RFC] Introduce module API to QEMU

From: Daniel Jacobowitz
Subject: Re: [Qemu-devel] [RFC] Introduce module API to QEMU
Date: Fri, 3 Apr 2009 10:04:19 -0400
User-agent: Mutt/1.5.17 (2008-05-11)

On Thu, Apr 02, 2009 at 09:12:35PM -0500, Anthony Liguori wrote:
> It uses __attribute__((section)) to make module_init/module_exit work.  I 
> looked
> at making this work by using a parser to find and extract all of these things.
> I'm not sure I know a good way to force the names to be unique via CPP but in
> the very least, I came to the determination that I would need to use something
> like perl or python which would introduce a new dependency to the build.

FYI, I'm pretty sure this will not work in a Windows-hosted QEMU.
There's a mandatory minimum alignment for PE/COFF sections and it will
introduce unexpected padding between your array elements.  I had to
remove a similar trick from prelink when we ported it to Windows.

Yes, this does raise the question of how __attribute__((constructor))
works.  Maybe it's specific to new named sections?  Maybe I'm just
misremembering.  Anyway, whatever you come up with, testing on
Windows would be a good idea if you haven't already.

Daniel Jacobowitz

reply via email to

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