diff --git a/include/rtdef.h b/include/rtdef.h index 1226b43020d6b6b73898be6076face3e0a3a40fa..02566019492777ce3cd10190db86d5531950bcd7 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -117,7 +117,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ /* Compiler Related Definitions */ #if defined(__CC_ARM) || defined(__CLANG_ARM) /* ARM Compiler */ #include - #define SECTION(x) __attribute__((section(x))) + #define RT_SECTION(x) __attribute__((section(x))) #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) @@ -133,7 +133,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #elif defined (__IAR_SYSTEMS_ICC__) /* for IAR Compiler */ #include - #define SECTION(x) @ x + #define RT_SECTION(x) @ x #define RT_UNUSED #define RT_USED __root #define PRAGMA(x) _Pragma(#x) @@ -154,7 +154,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define va_arg(v,l) __builtin_va_arg(v,l) #endif - #define SECTION(x) __attribute__((section(x))) + #define RT_SECTION(x) __attribute__((section(x))) #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) @@ -163,7 +163,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RTT_API #elif defined (__ADSPBLACKFIN__) /* for VisualDSP++ Compiler */ #include - #define SECTION(x) __attribute__((section(x))) + #define RT_SECTION(x) __attribute__((section(x))) #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) @@ -172,7 +172,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RTT_API #elif defined (_MSC_VER) #include - #define SECTION(x) + #define RT_SECTION(x) #define RT_UNUSED #define RT_USED #define ALIGN(n) __declspec(align(n)) @@ -184,7 +184,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ /* The way that TI compiler set section is different from other(at least * GCC and MDK) compilers. See ARM Optimizing C/C++ Compiler 5.9.3 for more * details. */ - #define SECTION(x) + #define RT_SECTION(x) #define RT_UNUSED #define RT_USED #define PRAGMA(x) _Pragma(#x) @@ -195,7 +195,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #elif defined (__TASKING__) #include - #define SECTION(x) + #define RT_SECTION(x) #define RT_UNUSED #define RT_USED #define PRAGMA(x) _Pragma(#x) @@ -222,11 +222,11 @@ typedef int (*init_fn_t)(void); }; #define INIT_EXPORT(fn, level) \ const char __rti_##fn##_name[] = #fn; \ - RT_USED const struct rt_init_desc __rt_init_desc_##fn SECTION(".rti_fn." level) = \ + RT_USED const struct rt_init_desc __rt_init_desc_##fn RT_SECTION(".rti_fn." level) = \ { __rti_##fn##_name, fn}; #else #define INIT_EXPORT(fn, level) \ - RT_USED const init_fn_t __rt_init_##fn SECTION(".rti_fn." level) = fn + RT_USED const init_fn_t __rt_init_##fn RT_SECTION(".rti_fn." level) = fn #endif #endif #else diff --git a/include/rtm.h b/include/rtm.h index 7e07a2239cd41c6401464b46b8a9c4cf858a4845..9da3a6b8b295fe5f2186788791e8068c1711d474 100644 --- a/include/rtm.h +++ b/include/rtm.h @@ -28,8 +28,8 @@ __declspec(allocate("RTMSymTab$f"))const char __rtmsym_##symbol##_name[] = "__vs #else #define RTM_EXPORT(symbol) \ -const char __rtmsym_##symbol##_name[] SECTION(".rodata.name") = #symbol; \ -const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \ +const char __rtmsym_##symbol##_name[] RT_SECTION(".rodata.name") = #symbol; \ +const struct rt_module_symtab __rtmsym_##symbol RT_SECTION("RTMSymTab")= \ { \ (void *)&symbol, \ __rtmsym_##symbol##_name \