From: Anthony Liguori <anthony@codemonkey.ws>
To: "M. Warner Losh" <imp@bsdimp.com>
Cc: qemu-devel@nongnu.org, paul@codesourcery.com
Subject: Re: [Qemu-devel] [RFC] Introduce module API to QEMU
Date: Fri, 03 Apr 2009 13:05:06 -0500 [thread overview]
Message-ID: <49D64FD2.4080003@codemonkey.ws> (raw)
In-Reply-To: <20090403.115843.84364240.imp@bsdimp.com>
M. Warner Losh wrote:
> In message: <49D6480F.2000408@codemonkey.ws>
> Anthony Liguori <anthony@codemonkey.ws> writes:
> : malc wrote:
> : > You are using _identifier_ whose name violates 7.1.3, full stop, you
> : > can not do that in _any_ context.
> : >
> :
> : So then we cannot use __func__ either or __attribute__ by your logic.
>
> No. That's not true. Those are defined by the standard or by the
> implementation. he's objecting to your using an identifier that
> starts with __ when really, there's no reason to do that.
>
The identifier is defined by the *implementation*. That's the whole point.
When you use the __attribute__((section,"FOO")), it forces the variable
to be in section FOO. For all sections, the linker (IOW the
*implementation*) creates two variables named __start_SECTION and
__stop_SECTION. In this case, it's __start_FOO and __stop_FOO.
You have to *declare* this variable yourself because the linker is not
the frontend and the frontend doesn't know about these variables. The
linker is what *defines* these variables.
It doesn't matter because I've switched to __attribute__((constructor)),
but this is not a violation of the standard. You cannot rename these
variables because you have no control over the definition. They are
there whether you like them or not.
Regards,
Anthony Liguori
> Warner
>
next prev parent reply other threads:[~2009-04-03 18:05 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-03 2:12 [Qemu-devel] [RFC] Introduce module API to QEMU Anthony Liguori
2009-04-03 2:29 ` malc
2009-04-03 3:36 ` Anthony Liguori
2009-04-03 3:48 ` malc
2009-04-03 12:59 ` Anthony Liguori
2009-04-03 17:00 ` malc
2009-04-03 17:31 ` Anthony Liguori
2009-04-03 17:46 ` malc
2009-04-03 17:59 ` M. Warner Losh
2009-04-03 17:58 ` M. Warner Losh
2009-04-03 18:05 ` Anthony Liguori [this message]
2009-04-03 20:12 ` Kevin Wolf
2009-04-03 18:30 ` malc
2009-04-03 7:08 ` Mark McLoughlin
2009-04-03 13:01 ` Anthony Liguori
2009-04-03 17:36 ` Anthony Liguori
2009-04-03 7:50 ` Avi Kivity
2009-04-03 11:35 ` Paul Brook
2009-04-03 12:57 ` Anthony Liguori
2009-04-03 13:09 ` Paul Brook
2009-04-03 14:10 ` Anthony Liguori
2009-04-03 14:11 ` Anthony Liguori
2009-04-03 14:28 ` Paul Brook
2009-04-03 14:53 ` Avi Kivity
2009-04-03 16:15 ` Anthony Liguori
2009-04-03 17:12 ` Blue Swirl
2009-04-03 14:04 ` Daniel Jacobowitz
2009-04-03 14:54 ` Avi Kivity
2009-04-03 15:10 ` Paul Brook
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=49D64FD2.4080003@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=imp@bsdimp.com \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.