提交 f5ede64c 编写于 作者: L liruncong

[include]SECTION=>RT_SECTION(与catch2中SECTION冲突)

上级 09024c25
......@@ -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 <stdarg.h>
#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 <stdarg.h>
#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 <stdarg.h>
#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 <stdarg.h>
#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 <stdarg.h>
#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
......
......@@ -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 \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册