lkml.org 
[lkml]   [2005]   [Oct]   [29]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
Patch in this message
/
DateSat, 29 Oct 2005 06:43:01 +0100
FromAl Viro <>
Subject[PATCH] MACHINE_START fix
	unreferenced static variables can be killed by cc(1), so when
we want them to survive (we collect these suckers in array in special
section), we'd better not make them static.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
----
diff -urN RC14-base/include/asm-arm/mach/arch.h current/include/asm-arm/mach/arch.h
--- RC14-base/include/asm-arm/mach/arch.h	2005-10-28 18:17:09.000000000 -0400
+++ current/include/asm-arm/mach/arch.h	2005-10-28 20:25:09.000000000 -0400
@@ -49,7 +49,7 @@
  * a table by the linker.
  */
 #define MACHINE_START(_type,_name)			\
-static const struct machine_desc __mach_desc_##_type	\
+const struct machine_desc __mach_desc_##_type	\
  __attribute__((__section__(".arch.info.init"))) = {	\
 	.nr		= MACH_TYPE_##_type,		\
 	.name		= _name,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-10-29 03:46    [W:0.150 / U:0.490 seconds]
©2003-2008 Jasper Spaans