Title: [8145] trunk/arch/blackfin: [!no_src_qa!]Fix bug[#5824] some modules fail to link symbol strcpy
Revision
8145
Author
sonicz
Date
2010-01-12 05:58:29 -0500 (Tue, 12 Jan 2010)

Log Message

[!no_src_qa!]Fix bug[#5824] some modules fail to link symbol strcpy

Because string functions are both inline and exported functions and
folder arch/blackfin/lib is configured as a library path in Makefile,
symbols exported in folder lib is not linked into built-in.o but
inlined only. In order to export string symbols in kernel to modules
properly, they should be exported in other folder.

Modified Paths

Diff

Modified: trunk/arch/blackfin/include/asm/string.h (8144 => 8145)


--- trunk/arch/blackfin/include/asm/string.h	2010-01-12 04:56:48 UTC (rev 8144)
+++ trunk/arch/blackfin/include/asm/string.h	2010-01-12 10:58:29 UTC (rev 8145)
@@ -12,7 +12,7 @@
 #ifdef __KERNEL__		/* only set these up for kernel code */
 
 #define __HAVE_ARCH_STRCPY
-extern inline char *strcpy(char *dest, const char *src)
+static inline char *strcpy(char *dest, const char *src)
 {
 	char *xdest = dest;
 	char temp = 0;
@@ -31,7 +31,7 @@
 }
 
 #define __HAVE_ARCH_STRNCPY
-extern inline char *strncpy(char *dest, const char *src, size_t n)
+static inline char *strncpy(char *dest, const char *src, size_t n)
 {
 	char *xdest = dest;
 	char temp = 0;
@@ -67,7 +67,7 @@
 }
 
 #define __HAVE_ARCH_STRCMP
-extern inline int strcmp(const char *cs, const char *ct)
+static inline int strcmp(const char *cs, const char *ct)
 {
 	/* need to use int's here so the char's in the assembly don't get
 	 * sign extended incorrectly when we don't want them to be
@@ -94,7 +94,7 @@
 }
 
 #define __HAVE_ARCH_STRNCMP
-extern inline int strncmp(const char *cs, const char *ct, size_t count)
+static inline int strncmp(const char *cs, const char *ct, size_t count)
 {
 	/* need to use int's here so the char's in the assembly don't get
 	 * sign extended incorrectly when we don't want them to be

Modified: trunk/arch/blackfin/kernel/bfin_ksyms.c (8144 => 8145)


--- trunk/arch/blackfin/kernel/bfin_ksyms.c	2010-01-12 04:56:48 UTC (rev 8144)
+++ trunk/arch/blackfin/kernel/bfin_ksyms.c	2010-01-12 10:58:29 UTC (rev 8145)
@@ -33,6 +33,18 @@
 EXPORT_SYMBOL(memchr);
 
 /*
+ * Because string functions are both inline and exported functions and
+ * folder arch/blackfin/lib is configured as a library path in Makefile,
+ * symbols exported in folder lib  is not linked into built-in.o but
+ * inlined only. In order to export string symbols to kernel module
+ * properly, they should be exported here.
+ */
+EXPORT_SYMBOL(strcpy);
+EXPORT_SYMBOL(strncpy);
+EXPORT_SYMBOL(strcmp);
+EXPORT_SYMBOL(strncmp);
+
+/*
  * libgcc functions - functions that are used internally by the
  * compiler...  (prototypes are not correct though, but that
  * doesn't really matter since they're not versioned).

Modified: trunk/arch/blackfin/lib/strcmp.c (8144 => 8145)


--- trunk/arch/blackfin/lib/strcmp.c	2010-01-12 04:56:48 UTC (rev 8144)
+++ trunk/arch/blackfin/lib/strcmp.c	2010-01-12 10:58:29 UTC (rev 8145)
@@ -10,10 +10,7 @@
 #include <asm/string.h>
 #undef strcmp
 
-#include <linux/module.h>
-
 int strcmp(const char *dest, const char *src)
 {
 	return __inline_strcmp(dest, src);
 }
-EXPORT_SYMBOL(strcmp);

Modified: trunk/arch/blackfin/lib/strcpy.c (8144 => 8145)


--- trunk/arch/blackfin/lib/strcpy.c	2010-01-12 04:56:48 UTC (rev 8144)
+++ trunk/arch/blackfin/lib/strcpy.c	2010-01-12 10:58:29 UTC (rev 8145)
@@ -10,10 +10,7 @@
 #include <asm/string.h>
 #undef strcpy
 
-#include <linux/module.h>
-
 char *strcpy(char *dest, const char *src)
 {
 	return __inline_strcpy(dest, src);
 }
-EXPORT_SYMBOL(strcpy);

Modified: trunk/arch/blackfin/lib/strncmp.c (8144 => 8145)


--- trunk/arch/blackfin/lib/strncmp.c	2010-01-12 04:56:48 UTC (rev 8144)
+++ trunk/arch/blackfin/lib/strncmp.c	2010-01-12 10:58:29 UTC (rev 8145)
@@ -8,11 +8,9 @@
 
 #define strncmp __inline_strncmp
 #include <asm/string.h>
-#include <linux/module.h>
 #undef strncmp
 
 int strncmp(const char *cs, const char *ct, size_t count)
 {
 	return __inline_strncmp(cs, ct, count);
 }
-EXPORT_SYMBOL(strncmp);

Modified: trunk/arch/blackfin/lib/strncpy.c (8144 => 8145)


--- trunk/arch/blackfin/lib/strncpy.c	2010-01-12 04:56:48 UTC (rev 8144)
+++ trunk/arch/blackfin/lib/strncpy.c	2010-01-12 10:58:29 UTC (rev 8145)
@@ -10,10 +10,7 @@
 #include <asm/string.h>
 #undef strncpy
 
-#include <linux/module.h>
-
 char *strncpy(char *dest, const char *src, size_t n)
 {
 	return __inline_strncpy(dest, src, n);
 }
-EXPORT_SYMBOL(strncpy);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to