public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
Cc: Jeff Garzik <jgarzik@mandrakesoft.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: const __init
Date: Sun, 20 May 2001 19:43:40 -0700	[thread overview]
Message-ID: <20010520194340.C19096@twiddle.net> (raw)
In-Reply-To: <Pine.LNX.4.05.10105202210370.1667-100000@callisto.of.borg> <3B083878.1785C27D@mandrakesoft.com> <20010521001949.R754@nightmaster.csn.tu-chemnitz.de>
In-Reply-To: <20010521001949.R754@nightmaster.csn.tu-chemnitz.de>; from ingo.oeser@informatik.tu-chemnitz.de on Mon, May 21, 2001 at 12:19:49AM +0200

On Mon, May 21, 2001 at 12:19:49AM +0200, Ingo Oeser wrote:
> AFAIK "const" is only a promise to the compiler, that we write
> this data ONCE and read only after this initial write. So the
> decision on the section is implementation defined.

No, the problem is not with which section, but what flags that
section should have.  If you put only "const" data in a section,
then the section should have SHF_WRITE clear.  Conversely, if
you put writable data in a section then SHF_WRITE should be set.

Now, one could argue that gcc should scan the entire file to
see if there are any non-constant data members added to a 
particular section, and set SHF_WRITE if any such exist.

My answer is: you would not like gcc's memory usage under these
conditions.


r~

  reply	other threads:[~2001-05-21  2:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-20 19:51 const __init Geert Uytterhoeven
2001-05-20 20:06 ` Jeff Garzik
2001-05-20 20:11   ` Geert Uytterhoeven
2001-05-20 21:34     ` Jeff Garzik
2001-05-20 22:19       ` Ingo Oeser
2001-05-21  2:43         ` Richard Henderson [this message]
2001-05-21 12:41           ` Jamie Lokier
2001-05-21  3:07       ` Keith Owens
2001-05-21  7:51         ` Richard Henderson
2001-05-21 20:01           ` J . A . Magallon
2001-05-20 20:16 ` Franz Sirl
2001-05-21  0:58   ` Keith Owens
2001-05-20 22:05 ` Russell King

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=20010520194340.C19096@twiddle.net \
    --to=rth@twiddle.net \
    --cc=geert@linux-m68k.org \
    --cc=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.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