This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Target-specific pragmas
- To: Joern Rennecke <amylaar at redhat dot com>
- Subject: Re: Target-specific pragmas
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Tue, 26 Jun 2001 08:29:46 +0100 (BST)
- cc: Geoff Keating <geoffk at geoffk dot org>, Stan Shebs <shebs at apple dot com>, <gcc at gcc dot gnu dot org>
On Tue, 26 Jun 2001, Joern Rennecke wrote:
> > ISTR that something like this would be useful for the Linux kernel, so
> > that strings in data used only at bootup can be freed, the same way the
> > arrays containing pointers to them, and initialization functions, are
> > freed.
>
> Hmm, why not making them arrays of char then?
Because defining a separate array out of line for every such string
constant is very cumbersome and messy compared to having a strings_section
attribute that could go in the kernel's __initdata macro definition.
(For anyone implementing something like this: the semantics of section
attributes for strings would include: strings remain readonly independent
of section; strings within the same section may be merged but those in
different sections may not. If strings get merged with const-qualified
compound literals, those would count as strings in the default section.)
--
Joseph S. Myers
jsm28@cam.ac.uk