From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LpeBl-0004NU-0F for qemu-devel@nongnu.org; Fri, 03 Apr 2009 03:51:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LpeBf-0004LL-Uv for qemu-devel@nongnu.org; Fri, 03 Apr 2009 03:51:44 -0400 Received: from [199.232.76.173] (port=48785 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LpeBf-0004L8-Mw for qemu-devel@nongnu.org; Fri, 03 Apr 2009 03:51:39 -0400 Received: from mx2.redhat.com ([66.187.237.31]:33416) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LpeBf-0003WR-6n for qemu-devel@nongnu.org; Fri, 03 Apr 2009 03:51:39 -0400 Message-ID: <49D5BFB7.9040908@redhat.com> Date: Fri, 03 Apr 2009 10:50:15 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] Introduce module API to QEMU References: <1238724755-15929-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1238724755-15929-1-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Paul Brook 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. > > I figured using the GCCism was a lesser burden since we don't attempt to support > any compiler other than GCC today. > If we're introducing a gccism, __attribute__((__constructor__)) is a lesser evil IMO, and much more understandable. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.