Skip to contentSkip to conversation

gcc-3.3 warns about 2.5.59 EXPORT_SYMBOL

PATCH New Arnd Bergmann 1 participant 1 message Jan 23, 2003 Module support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gcc-3.3 warns about 2.5.59 EXPORT_SYMBOL

When building linux-2.5.59 with gcc-3.3 (on s390, if that matters), I get a warning like "warning: `__ksymtab___foo' defined but not used" each time that EXPORT_SYMBOL is used.
The patch below fixes this.

	Arnd <><
include/linux/module.h +2 -2
@@ -145,7 +145,7 @@
 	__attribute__((section("__ksymtab_strings")))		\
 	= MODULE_SYMBOL_PREFIX #sym;                    	\
 	static const struct kernel_symbol __ksymtab_##sym	\
-	__attribute__((section("__ksymtab")))			\
+	__attribute__((section("__ksymtab"),unused))		\
 	= { (unsigned long)&sym, __kstrtab_##sym }
 
 #define EXPORT_SYMBOL_NOVERS(sym) EXPORT_SYMBOL(sym)
@@ -155,7 +155,7 @@
 	__attribute__((section("__ksymtab_strings")))		\
 	= MODULE_SYMBOL_PREFIX #sym;                    	\
 	static const struct kernel_symbol __ksymtab_##sym	\
-	__attribute__((section("__gpl_ksymtab")))		\
+	__attribute__((section("__gpl_ksymtab"),unused))	\
 	= { (unsigned long)&sym, __kstrtab_##sym }
 
 struct module_ref