From: Iain Sandoe <idsandoe@googlemail.com>
To: Bernhard Schommer <bernhardschommer@gmail.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: -fno-common
Date: Tue, 29 Jan 2019 08:29:00 -0000 [thread overview]
Message-ID: <7E9DB7F5-A217-4CCB-95EF-C37DFC001479@googlemail.com> (raw)
In-Reply-To: <CAG8G+nv0QtBoBp0JVyLKPn7rxsF6s2rokfpqVpB4BtJ_Vq4=Ew@mail.gmail.com>
> On 28 Jan 2019, at 15:58, Bernhard Schommer <bernhardschommer@gmail.com> wrote:
>
> I would like to know if the handling of the option -fno-common has
> changed between version 7.3 and 8.2 for x86. I tried it with the
> default system version of OpenSUSE and for example:
>
> const int i;
>
> is placed in the .bss section. With a newer self-compiled version 8.2
> the same variable is placed in the section .rodata. I could not find
> any information in the Changelog whether the behavior has changed and
> thus would like to know if there was any change.
If you look in of, say, http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
at section
• 6.7.3 Type qualifiers
there’s a footnote:
• 132) The implementation may place a const object that is not volatile in a read-only region of storage. Moreover, the implementation need not allocate storage for such an object if its address is never used.
---
So, I don’t think you can make any assumption about whether such items appear in bss or .rodata (or const on darwin, for example).
HTH,
Iain
next prev parent reply other threads:[~2019-01-29 8:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 15:59 -fno-common Bernhard Schommer
2019-01-29 8:29 ` Iain Sandoe [this message]
2019-01-29 9:41 ` -fno-common Richard Biener
2019-01-29 9:54 ` -fno-common David Brown
2019-01-29 10:09 ` -fno-common Bernhard Schommer
2019-01-29 10:13 ` -fno-common Jakub Jelinek
2019-01-29 10:24 ` -fno-common David Brown
2019-01-29 12:05 ` -fno-common Bernhard Schommer
-- strict thread matches above, loose matches on Subject: below --
2005-03-31 19:57 -fno-common Dave Korn
2005-03-31 20:18 ` -fno-common Daniel Jacobowitz
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=7E9DB7F5-A217-4CCB-95EF-C37DFC001479@googlemail.com \
--to=idsandoe@googlemail.com \
--cc=bernhardschommer@gmail.com \
--cc=gcc@gcc.gnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).