diff options
| author | Bernard Xiong <[email protected]> | 2015-10-23 22:10:13 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2015-10-23 22:10:13 +0800 |
| commit | 3677f4de9ffbd1211112d3a8791cf0091432c60c (patch) | |
| tree | e47ef2d988cb6ae3e95351ba33e1fda01665e089 /components/libc/armlibc | |
| parent | 20b8293a8413ae22038ff64257541ee07b72bf35 (diff) | |
| parent | 78193f3c40efd9bb7cffe515bf5ffcc68da08573 (diff) | |
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
Diffstat (limited to 'components/libc/armlibc')
| -rw-r--r-- | components/libc/armlibc/libc_syms.c | 39 | ||||
| -rw-r--r-- | components/libc/armlibc/mem_std.c | 4 |
2 files changed, 43 insertions, 0 deletions
diff --git a/components/libc/armlibc/libc_syms.c b/components/libc/armlibc/libc_syms.c new file mode 100644 index 0000000000..847c48544a --- /dev/null +++ b/components/libc/armlibc/libc_syms.c @@ -0,0 +1,39 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <time.h> + +#include <rtm.h> + +/* some export routines for module */ + +RTM_EXPORT(strstr); +RTM_EXPORT(strlen); +RTM_EXPORT(strchr); +RTM_EXPORT(strcpy); +RTM_EXPORT(strncpy); +RTM_EXPORT(strcmp); +RTM_EXPORT(strncmp); +RTM_EXPORT(strcat); +RTM_EXPORT(strtol); + +RTM_EXPORT(memcpy); +RTM_EXPORT(memcmp); +RTM_EXPORT(memmove); +RTM_EXPORT(memset); +RTM_EXPORT(memchr); + +RTM_EXPORT(toupper); +RTM_EXPORT(atoi); + +RTM_EXPORT(localtime); +RTM_EXPORT(time); + +/* import the full stdio for printf */ +#ifdef __MICROLIB +#error "[RT_USING_LIBC] Please use standard libc but not microlib." +#endif + +RTM_EXPORT(puts); +RTM_EXPORT(printf); diff --git a/components/libc/armlibc/mem_std.c b/components/libc/armlibc/mem_std.c index 6faf86555f..56aa525df2 100644 --- a/components/libc/armlibc/mem_std.c +++ b/components/libc/armlibc/mem_std.c @@ -22,18 +22,22 @@ void *malloc(int n) { return rt_malloc(n); } +RTM_EXPORT(malloc); void *realloc(void *rmem, rt_size_t newsize) { return rt_realloc(rmem, newsize); } +RTM_EXPORT(realloc); void *calloc(rt_size_t nelem, rt_size_t elsize) { return rt_calloc(nelem, elsize); } +RTM_EXPORT(calloc); void free(void *rmem) { rt_free(rmem); } +RTM_EXPORT(free); |
