|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [RFC] Introduce module API to QEMU |
Date: | Thu, 02 Apr 2009 22:36:04 -0500 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090320) |
malc wrote:
Once again ISO/IEC 9899:1990 4.1.2
I don't see a 4.1.2... Section 4 is "Conformance".
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 :-)
Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |