diff --git a/common/command.c b/common/command.c index 5d8577f9e..f3b3d360b 100644 --- a/common/command.c +++ b/common/command.c @@ -137,6 +137,7 @@ void u_boot_cmd_usage(cmd_tbl_t *cmdtp) } #endif /* CONFIG_LONGHELP */ } +EXPORT_SYMBOL(u_boot_cmd_usage); /* * Use puts() instead of printf() to avoid printf buffer overflow @@ -198,7 +199,7 @@ U_BOOT_CMD_START(help) U_BOOT_CMD_HELP(cmd_help_help) U_BOOT_CMD_END -#ifdef CONFIG_MODULE +#ifdef CONFIG_MODULES struct cmd_list { cmd_tbl_t *cmd; struct cmd_list *next; @@ -237,12 +238,12 @@ cmd_tbl_t *find_cmd (const char *cmd) cmd_tbl_t *cmdtp_temp = &__u_boot_cmd_start; /*Init value */ int len; int n_found = 0; -#ifdef CONFIG_MODULE +#ifdef CONFIG_MODULES struct cmd_list *list = cmd_list; #endif len = strlen (cmd); -#ifdef CONFIG_MODULE +#ifdef CONFIG_MODULES while(list) { cmdtp = list->cmd; if (strncmp (cmd, cmdtp->name, len) == 0) { diff --git a/common/dlmalloc.c b/common/dlmalloc.c index a22fee530..c4df2f0f7 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -2149,3 +2149,8 @@ History: structure of old version, but most details differ.) */ + +EXPORT_SYMBOL(malloc); +EXPORT_SYMBOL(free); +EXPORT_SYMBOL(realloc); + diff --git a/common/misc.c b/common/misc.c index 35fd8eb1e..ee11ead87 100644 --- a/common/misc.c +++ b/common/misc.c @@ -70,6 +70,7 @@ void *sbrk (ptrdiff_t increment) } int errno; +EXPORT_SYMBOL(errno); #ifndef CONFIG_ERRNO_MESSAGES static char errno_string[5]; @@ -151,6 +152,7 @@ const char *errno_str(void) return errno_string; #endif } +EXPORT_SYMBOL(errno_str); void perror(const char *s) { diff --git a/include/common.h b/include/common.h index 8110f1a08..889846dbc 100644 --- a/include/common.h +++ b/include/common.h @@ -26,7 +26,7 @@ #include #include - +#include #include #include #include diff --git a/lib/readkey.c b/lib/readkey.c index acfb0097d..5937fd0b2 100644 --- a/lib/readkey.c +++ b/lib/readkey.c @@ -78,4 +78,4 @@ char read_key(void) } return c; } - +EXPORT_SYMBOL(read_key); diff --git a/lib/string.c b/lib/string.c index b27d2a199..baa2cc799 100644 --- a/lib/string.c +++ b/lib/string.c @@ -20,8 +20,6 @@ #include #include - - char * ___strtok; #ifndef __HAVE_ARCH_STRCPY @@ -39,6 +37,7 @@ char * strcpy(char * dest,const char *src) return tmp; } #endif +EXPORT_SYMBOL(strcpy); #ifndef __HAVE_ARCH_STRNCPY /** @@ -61,6 +60,7 @@ char * strncpy(char * dest,const char *src,size_t count) return tmp; } #endif +EXPORT_SYMBOL(strncpy); #ifndef __HAVE_ARCH_STRCAT /** @@ -80,6 +80,7 @@ char * strcat(char * dest, const char * src) return tmp; } #endif +EXPORT_SYMBOL(strcat); #ifndef __HAVE_ARCH_STRNCAT /** @@ -109,6 +110,7 @@ char * strncat(char *dest, const char *src, size_t count) return tmp; } #endif +EXPORT_SYMBOL(strncat); #ifndef __HAVE_ARCH_STRCMP /** @@ -128,6 +130,7 @@ int strcmp(const char * cs,const char * ct) return __res; } #endif +EXPORT_SYMBOL(strcmp); #ifndef __HAVE_ARCH_STRNCMP /** @@ -149,6 +152,7 @@ int strncmp(const char * cs,const char * ct,size_t count) return __res; } #endif +EXPORT_SYMBOL(strncmp); #ifndef __HAVE_ARCH_STRCHR /** @@ -164,6 +168,7 @@ char * strchr(const char * s, int c) return (char *) s; } #endif +EXPORT_SYMBOL(strchr); #ifndef __HAVE_ARCH_STRRCHR /** @@ -181,6 +186,7 @@ char * strrchr(const char * s, int c) return NULL; } #endif +EXPORT_SYMBOL(strrchr); #ifndef __HAVE_ARCH_STRLEN /** @@ -196,6 +202,7 @@ size_t strlen(const char * s) return sc - s; } #endif +EXPORT_SYMBOL(strlen); #ifndef __HAVE_ARCH_STRNLEN /** @@ -212,6 +219,7 @@ size_t strnlen(const char * s, size_t count) return sc - s; } #endif +EXPORT_SYMBOL(strnlen); #ifndef __HAVE_ARCH_STRDUP char * strdup(const char *s) @@ -227,6 +235,7 @@ char * strdup(const char *s) return new; } #endif +EXPORT_SYMBOL(strdup); #ifndef __HAVE_ARCH_STRSPN /** @@ -254,6 +263,7 @@ size_t strspn(const char *s, const char *accept) return count; } #endif +EXPORT_SYMBOL(strspn); #ifndef __HAVE_ARCH_STRPBRK /** @@ -274,6 +284,7 @@ char * strpbrk(const char * cs,const char * ct) return NULL; } #endif +EXPORT_SYMBOL(strpbrk); #ifndef __HAVE_ARCH_STRTOK /** @@ -303,6 +314,7 @@ char * strtok(char * s,const char * ct) return (sbegin); } #endif +EXPORT_SYMBOL(strtok); #ifndef __HAVE_ARCH_STRSEP /** @@ -331,6 +343,7 @@ char * strsep(char **s, const char *ct) return sbegin; } #endif +EXPORT_SYMBOL(strsep); #ifndef __HAVE_ARCH_STRSWAB /** @@ -379,6 +392,7 @@ void * memset(void * s,int c,size_t count) return s; } #endif +EXPORT_SYMBOL(memset); #ifndef __HAVE_ARCH_BCOPY /** @@ -424,6 +438,7 @@ void * memcpy(void * dest,const void *src,size_t count) return dest; } #endif +EXPORT_SYMBOL(memcpy); #ifndef __HAVE_ARCH_MEMMOVE /** @@ -454,6 +469,7 @@ void * memmove(void * dest,const void *src,size_t count) return dest; } #endif +EXPORT_SYMBOL(memmove); #ifndef __HAVE_ARCH_MEMCMP /** @@ -473,6 +489,7 @@ int memcmp(const void * cs,const void * ct,size_t count) return res; } #endif +EXPORT_SYMBOL(memcmp); #ifndef __HAVE_ARCH_MEMSCAN /** @@ -497,6 +514,7 @@ void * memscan(void * addr, int c, size_t size) return (void *) p; } #endif +EXPORT_SYMBOL(memscan); #ifndef __HAVE_ARCH_STRSTR /** @@ -521,6 +539,7 @@ char * strstr(const char * s1,const char * s2) return NULL; } #endif +EXPORT_SYMBOL(strstr); #ifndef __HAVE_ARCH_MEMCHR /** @@ -544,3 +563,5 @@ void *memchr(const void *s, int c, size_t n) } #endif +EXPORT_SYMBOL(memchr); +