From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: const __init
Date: Sun, 20 May 2001 17:34:48 -0400 [thread overview]
Message-ID: <3B083878.1785C27D@mandrakesoft.com> (raw)
In-Reply-To: <Pine.LNX.4.05.10105202210370.1667-100000@callisto.of.borg>
Geert Uytterhoeven wrote:
>
> On Sun, 20 May 2001, Jeff Garzik wrote:
> > Geert Uytterhoeven wrote:
> > > Since a while include/linux/init.h contains the line
> > >
> > > * Also note, that this data cannot be "const".
> > >
> > > Why is this? Because const data will be put in a different section?
> >
> > Causes a "section type conflict" build error, at least on x86.
>
> On m68k I only saw section type conflict errors when using __init while it
> should have been __initdata.
This might be a very valid point...
(let me know if the following test is flawed)
> [jgarzik@rum tmp]$ cat > sectest.c
> #include <linux/module.h>
> #include <linux/init.h>
> static const char version[] __initdata = "foo";
> [jgarzik@rum tmp]$ gcc -D__KERNEL__ -I/spare/cvs/linux_2_4/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i686 -c -o sectest.o sectest.c
> [jgarzik@rum tmp]$
No section type conflict appears.
--
Jeff Garzik | "Do you have to make light of everything?!"
Building 1024 | "I'm extremely serious about nailing your
MandrakeSoft | step-daughter, but other than that, yes."
next prev parent reply other threads:[~2001-05-20 21:35 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 [this message]
2001-05-20 22:19 ` Ingo Oeser
2001-05-21 2:43 ` Richard Henderson
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=3B083878.1785C27D@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=geert@linux-m68k.org \
--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