qemu-devel
[Top][All Lists]
Advanced

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

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


From: malc
Subject: Re: [Qemu-devel] [RFC] Introduce module API to QEMU
Date: Fri, 3 Apr 2009 07:48:15 +0400 (MSD)

On Thu, 2 Apr 2009, Anthony Liguori wrote:

> malc wrote:
> > Once again ISO/IEC 9899:1990 4.1.2
> >   
> 
> I don't see a 4.1.2...  Section 4 is "Conformance".

4.1.2 comes from C90

> >            ISO/IEC 9899:1999 7.1.3
> >   
>
> At any rate, I assume you're referring to:
> 
> > +extern module_init_fn __start_initfuncs[], __stop_initfuncs[];
> > +extern module_exit_fn __start_exitfuncs[], __stop_exitfuncs[];
> 
> All sections have variable definitions that define their start and stop 
> that are in the form __start_SECTION and __stop_SECTION.  The 
> __attribute__((section("initfuncs"), used)) directive adds a new section 
> (if necessary) named initfuncs and the linker will create these 
> variables.  If you look closely, the patch doesn't define these 
> variables, it just declares them because they're defined by the linker.
> 
> So this is exactly the sort of thing that the standard is there to 
> protect :-)

No. Those are reserved for _any_ use. For example, 6.2.5 states:

     31) An implementation may define new keywords that provide
         alternative ways to designate  a  basic  (or  any  other)
         type;  this does not violate the requirement that all
         basic   types   be   different.    Implementation-defined
         keywords  shall  have  the form of an identifier reserved
         for any use as described in 7.1.3.

-- 
mailto:address@hidden




reply via email to

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