public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.4-ac6 compile error in plip.c
@ 2001-05-10 13:46 Moses McKnight
  2001-05-11  4:53 ` Keith Owens
  0 siblings, 1 reply; 3+ messages in thread
From: Moses McKnight @ 2001-05-10 13:46 UTC (permalink / raw)
  To: linux-kernel

Hi, I get the following error trying to compile 2.4.4-ac6 using gcc 
2.95.4 (debian package).

plip.c:1412: __setup_str_plip_setup causes a section type conflict


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.4.4-ac6 compile error in plip.c
  2001-05-10 13:46 2.4.4-ac6 compile error in plip.c Moses McKnight
@ 2001-05-11  4:53 ` Keith Owens
  2001-05-11  8:03   ` Ingo Oeser
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Owens @ 2001-05-11  4:53 UTC (permalink / raw)
  To: Moses McKnight; +Cc: linux-kernel, Alan Cox

On Thu, 10 May 2001 08:46:43 -0500, 
Moses McKnight <m_mcknight@surfbest.net> wrote:
>Hi, I get the following error trying to compile 2.4.4-ac6 using gcc 
>2.95.4 (debian package).
>
>plip.c:1412: __setup_str_plip_setup causes a section type conflict

The first __initdata is marked as const, the second is not, a section
cannot contain both const and non-const data.  Against 2.4.4-ac6.

Index: 4.16/drivers/net/plip.c
--- 4.16/drivers/net/plip.c Thu, 26 Apr 2001 12:38:49 +1000 kaos (linux-2.4/l/c/23_plip.c 1.2.1.3 644)
+++ 4.16(w)/drivers/net/plip.c Fri, 11 May 2001 14:50:39 +1000 kaos (linux-2.4/l/c/23_plip.c 1.2.1.3 644)
@@ -120,7 +120,7 @@
 
 #include <linux/parport.h>
 
-static const char version[] __initdata =
+static char version[] __initdata =
 	KERN_INFO "NET3 PLIP version 2.4-parport gniibe@mri.co.jp\n";
 
 /* Maximum number of devices to support. */


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.4.4-ac6 compile error in plip.c
  2001-05-11  4:53 ` Keith Owens
@ 2001-05-11  8:03   ` Ingo Oeser
  0 siblings, 0 replies; 3+ messages in thread
From: Ingo Oeser @ 2001-05-11  8:03 UTC (permalink / raw)
  To: Keith Owens; +Cc: linux-kernel, Paul Rusty Russel

On Fri, May 11, 2001 at 02:53:09PM +1000, Keith Owens wrote:
> The first __initdata is marked as const, the second is not, a section
> cannot contain both const and non-const data.  Against 2.4.4-ac6.

So we should also update the documentation to reflect this.

--- linux-2.4.4/include/linux/init.h.orig	Wed May  9 21:33:38 2001
+++ linux-2.4.4/include/linux/init.h	Fri May 11 09:53:57 2001
@@ -34,6 +34,8 @@
  * Don't forget to initialize data not at file scope, i.e. within a function,
  * as gcc otherwise puts the data into the bss section and not into the init
  * section.
+ * 
+ * Also note, that this data cannot be "const".
  */
 
 #ifndef MODULE
--- linux-2.4.4/Documentation/DocBook/kernel-hacking.tmpl.orig	Fri Apr  6 19:42:55 2001
+++ linux-2.4.4/Documentation/DocBook/kernel-hacking.tmpl	Fri May 11 09:58:45 2001
@@ -713,7 +713,8 @@
    </para>
    <para>
    Static data structures marked as <type>__initdata</type> must be initialised
-   (as opposed to ordinary static data which is zeroed BSS).
+   (as opposed to ordinary static data which is zeroed BSS) and cannot be 
+   <type>const</type>.
    </para> 
 
   </sect1>

Regards

Ingo Oeser
-- 
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
         <<<<<<<<<<<<     been there and had much fun   >>>>>>>>>>>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-11  8:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-10 13:46 2.4.4-ac6 compile error in plip.c Moses McKnight
2001-05-11  4:53 ` Keith Owens
2001-05-11  8:03   ` Ingo Oeser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox