2.4.4-ac6 compile error in plip.c
Subsystems (2)
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
Quoted 4 lines · Moses McKnight
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_setupcauses 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
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) renamed from 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) +1 -1
@@ -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 [email protected]\n"; /* Maximum number of devices to support. */
Quoted 2 lines · Keith Owens
The first
__initdatais 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.
include/linux/init.h renamed from include/linux/init.h.orig +2 -0
@@ -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
Documentation/DocBook/kernel-hacking.tmpl renamed from Documentation/DocBook/kernel-hacking.tmpl.orig +2 -1
@@ -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
Signature · 2 lines
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
<<<<<<<<<<<< been there and had much fun >>>>>>>>>>>>