diff --git a/components/cplusplus/crt_init.c b/components/cplusplus/crt_init.c index ebcc4af37d48c1319699b0ea42069ec9cd55c220..12c92dc6fbaabed2fb5cc45ccc2b27279d38cb2b 100755 --- a/components/cplusplus/crt_init.c +++ b/components/cplusplus/crt_init.c @@ -44,11 +44,11 @@ void _fini() { } -WEAK void *__dso_handle = 0; +RT_WEAK void *__dso_handle = 0; #endif -WEAK +RT_WEAK int cplusplus_system_init(void) { #if defined(__GNUC__) && !defined(__CC_ARM) diff --git a/components/dfs/filesystems/romfs/romfs.c b/components/dfs/filesystems/romfs/romfs.c index ff4b35305929e7adf44955005cc1d3cd02d5fd8e..a571c36ec691ac32ab3eb15668995ed35bf3aedb 100644 --- a/components/dfs/filesystems/romfs/romfs.c +++ b/components/dfs/filesystems/romfs/romfs.c @@ -39,13 +39,13 @@ const static unsigned char _dummy_txt[] = 0x74,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x61,0x20,0x66,0x69,0x6c,0x65,0x21,0x0d,0x0a, }; -const struct romfs_dirent WEAK _root_dirent[] = +const struct romfs_dirent RT_WEAK _root_dirent[] = { {ROMFS_DIRENT_DIR, "dummy", (rt_uint8_t *)_dummy, sizeof(_dummy)/sizeof(_dummy[0])}, {ROMFS_DIRENT_FILE, "dummy.txt", _dummy_txt, sizeof(_dummy_txt)}, }; -const struct romfs_dirent WEAK romfs_root = +const struct romfs_dirent RT_WEAK romfs_root = { ROMFS_DIRENT_DIR, "/", (rt_uint8_t *)_root_dirent, sizeof(_root_dirent)/sizeof(_root_dirent[0]) }; diff --git a/components/net/lwip-2.0.0/src/arch/sys_arch.c b/components/net/lwip-2.0.0/src/arch/sys_arch.c index 7db873f1308a889ca29bcec6563d99a6cd5be268..c5b4dbbf47f246270f54033e60e24648031f1172 100644 --- a/components/net/lwip-2.0.0/src/arch/sys_arch.c +++ b/components/net/lwip-2.0.0/src/arch/sys_arch.c @@ -600,7 +600,7 @@ u32_t sys_now(void) return rt_tick_get() * (1000 / RT_TICK_PER_SECOND); } -WEAK +RT_WEAK void mem_init(void) { } diff --git a/components/net/lwip-2.0.2/src/arch/sys_arch.c b/components/net/lwip-2.0.2/src/arch/sys_arch.c index 6bfcf8067ea5c1ce4ccee148dcc9e44a9b184729..bb809ac6ad9119391d288e15749c0666c68eb22d 100644 --- a/components/net/lwip-2.0.2/src/arch/sys_arch.c +++ b/components/net/lwip-2.0.2/src/arch/sys_arch.c @@ -602,7 +602,7 @@ u32_t sys_now(void) } -WEAK +RT_WEAK void mem_init(void) { } diff --git a/include/rtdef.h b/include/rtdef.h index 005c6b846c03e886539681afdf422c8abc86bafd..e44f39fdd86f4372d483abf8c69c388e485fd418 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -97,7 +97,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) - #define WEAK __weak + #define RT_WEAK __weak #define rt_inline static __inline /* module compiling */ #ifdef RT_USING_MODULE @@ -113,7 +113,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_USED __root #define PRAGMA(x) _Pragma(#x) #define ALIGN(n) PRAGMA(data_alignment=n) - #define WEAK __weak + #define RT_WEAK __weak #define rt_inline static inline #define RTT_API @@ -133,7 +133,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) - #define WEAK __attribute__((weak)) + #define RT_WEAK __attribute__((weak)) #define rt_inline static __inline #define RTT_API #elif defined (__ADSPBLACKFIN__) /* for VisualDSP++ Compiler */ @@ -142,7 +142,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) - #define WEAK __attribute__((weak)) + #define RT_WEAK __attribute__((weak)) #define rt_inline static inline #define RTT_API #elif defined (_MSC_VER) @@ -151,7 +151,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_UNUSED #define RT_USED #define ALIGN(n) __declspec(align(n)) - #define WEAK + #define RT_WEAK #define rt_inline static __inline #define RTT_API #elif defined (__TI_COMPILER_VERSION__) @@ -164,7 +164,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_USED #define PRAGMA(x) _Pragma(#x) #define ALIGN(n) - #define WEAK + #define RT_WEAK #define rt_inline static inline #define RTT_API #else diff --git a/src/kservice.c b/src/kservice.c index c694037dd20c45bc52906824a55c08a9e110b307..4ffccaf341ce5ac2d08787e310dd3188275a70ea 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -1101,7 +1101,7 @@ rt_device_t rt_console_set_device(const char *name) RTM_EXPORT(rt_console_set_device); #endif -WEAK void rt_hw_console_output(const char *str) +RT_WEAK void rt_hw_console_output(const char *str) { /* empty console output */ }