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

This commit is contained in:
liruncong 2021-02-09 23:25:46 +08:00
parent 12d5ca60c5
commit 0208fc5546
5 changed files with 17 additions and 17 deletions

View File

@ -90,9 +90,9 @@ struct finsh_syscall* finsh_syscall_lookup(const char* name);
#else #else
#define FINSH_FUNCTION_EXPORT_CMD(name, cmd, desc) \ #define FINSH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
const char __fsym_##cmd##_name[] SECTION(".rodata.name") = #cmd; \ const char __fsym_##cmd##_name[] RT_SECTION(".rodata.name") = #cmd; \
const char __fsym_##cmd##_desc[] SECTION(".rodata.name") = #desc; \ const char __fsym_##cmd##_desc[] RT_SECTION(".rodata.name") = #desc; \
RT_USED const struct finsh_syscall __fsym_##cmd SECTION("FSymTab")= \ RT_USED const struct finsh_syscall __fsym_##cmd RT_SECTION("FSymTab")= \
{ \ { \
__fsym_##cmd##_name, \ __fsym_##cmd##_name, \
__fsym_##cmd##_desc, \ __fsym_##cmd##_desc, \
@ -100,9 +100,9 @@ struct finsh_syscall* finsh_syscall_lookup(const char* name);
}; };
#define FINSH_VAR_EXPORT(name, type, desc) \ #define FINSH_VAR_EXPORT(name, type, desc) \
const char __vsym_##name##_name[] SECTION(".rodata.name") = #name; \ const char __vsym_##name##_name[] RT_SECTION(".rodata.name") = #name; \
const char __vsym_##name##_desc[] SECTION(".rodata.name") = #desc; \ const char __vsym_##name##_desc[] RT_SECTION(".rodata.name") = #desc; \
RT_USED const struct finsh_sysvar __vsym_##name SECTION("VSymTab")= \ RT_USED const struct finsh_sysvar __vsym_##name RT_SECTION("VSymTab")= \
{ \ { \
__vsym_##name##_name, \ __vsym_##name##_name, \
__vsym_##name##_desc, \ __vsym_##name##_desc, \
@ -155,7 +155,7 @@ struct finsh_syscall* finsh_syscall_lookup(const char* name);
#else #else
#define FINSH_FUNCTION_EXPORT_CMD(name, cmd, desc) \ #define FINSH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
const char __fsym_##cmd##_name[] = #cmd; \ const char __fsym_##cmd##_name[] = #cmd; \
RT_USED const struct finsh_syscall __fsym_##cmd SECTION("FSymTab")= \ RT_USED const struct finsh_syscall __fsym_##cmd RT_SECTION("FSymTab")= \
{ \ { \
__fsym_##cmd##_name, \ __fsym_##cmd##_name, \
(syscall_func)&name \ (syscall_func)&name \
@ -163,7 +163,7 @@ struct finsh_syscall* finsh_syscall_lookup(const char* name);
#define FINSH_VAR_EXPORT(name, type, desc) \ #define FINSH_VAR_EXPORT(name, type, desc) \
const char __vsym_##name##_name[] = #name; \ const char __vsym_##name##_name[] = #name; \
RT_USED const struct finsh_sysvar __vsym_##name SECTION("VSymTab")= \ RT_USED const struct finsh_sysvar __vsym_##name RT_SECTION("VSymTab")= \
{ \ { \
__vsym_##name##_name, \ __vsym_##name##_name, \
type, \ type, \

View File

@ -50,7 +50,7 @@ extern "C" {
#endif #endif
#define AT_CMD_EXPORT(_name_, _args_expr_, _test_, _query_, _setup_, _exec_) \ #define AT_CMD_EXPORT(_name_, _args_expr_, _test_, _query_, _setup_, _exec_) \
RT_USED static const struct at_cmd __at_cmd_##_test_##_query_##_setup_##_exec_ SECTION("RtAtCmdTab") = \ RT_USED static const struct at_cmd __at_cmd_##_test_##_query_##_setup_##_exec_ RT_SECTION("RtAtCmdTab") = \
{ \ { \
_name_, \ _name_, \
_args_expr_, \ _args_expr_, \

View File

@ -138,7 +138,7 @@ utest_t utest_handle_get(void);
*/ */
#define UTEST_TC_EXPORT(testcase, name, init, cleanup, timeout) \ #define UTEST_TC_EXPORT(testcase, name, init, cleanup, timeout) \
RT_USED static const struct utest_tc_export _utest_testcase \ RT_USED static const struct utest_tc_export _utest_testcase \
SECTION("UtestTcTab") = \ RT_SECTION("UtestTcTab") = \
{ \ { \
name, \ name, \
timeout, \ timeout, \

View File

@ -22,9 +22,9 @@
extern void rt_hw_interrupt_init(void); extern void rt_hw_interrupt_init(void);
extern void rt_application_init(void); extern void rt_application_init(void);
void vmm_entry(struct vmm_entry_param* param) SECTION(".vmm_init"); void vmm_entry(struct vmm_entry_param* param) RT_SECTION(".vmm_init");
struct rt_thread vmm_thread SECTION(".bss.share.vmm"); struct rt_thread vmm_thread RT_SECTION(".bss.share.vmm");
extern rt_uint8_t vmm_stack_start; extern rt_uint8_t vmm_stack_start;
extern rt_uint8_t vmm_stack_end; extern rt_uint8_t vmm_stack_end;
@ -75,7 +75,7 @@ static void vmm_entry_glue(rt_uint32_t level,
unsigned int kernel_domain) unsigned int kernel_domain)
/* inline would make the section setting meaningless */ /* inline would make the section setting meaningless */
__attribute__((noinline)) __attribute__((noinline))
SECTION(".vmm_glue"); RT_SECTION(".vmm_glue");
static void vmm_entry_glue(rt_uint32_t level, static void vmm_entry_glue(rt_uint32_t level,
unsigned int vmm_domain, unsigned int vmm_domain,
unsigned int kernel_domain) unsigned int kernel_domain)

View File

@ -18,7 +18,7 @@
#include "vmm_context.h" #include "vmm_context.h"
struct rt_vmm_share_layout rt_vmm_share SECTION(".vmm.share"); struct rt_vmm_share_layout rt_vmm_share RT_SECTION(".vmm.share");
volatile struct vmm_context *_vmm_context = RT_NULL; volatile struct vmm_context *_vmm_context = RT_NULL;
@ -31,13 +31,13 @@ void vmm_context_init(void *context_addr)
} }
#ifdef RT_VMM_USING_DOMAIN #ifdef RT_VMM_USING_DOMAIN
unsigned long guest_domain_val SECTION(".bss.share"); unsigned long guest_domain_val RT_SECTION(".bss.share");
unsigned long vmm_domain_val SECTION(".bss.share"); unsigned long vmm_domain_val RT_SECTION(".bss.share");
/* some RT-Thread code need to be called in the guest /* some RT-Thread code need to be called in the guest
* context(rt_thread_idle_excute for example). To simplify the code, we need a * context(rt_thread_idle_excute for example). To simplify the code, we need a
* "super" domain mode to have access of both side. The code executed in super * "super" domain mode to have access of both side. The code executed in super
* domain mode is restricted and should be harmless. */ * domain mode is restricted and should be harmless. */
unsigned long super_domain_val SECTION(".bss.share"); unsigned long super_domain_val RT_SECTION(".bss.share");
void vmm_context_init_domain(struct vmm_domain *domain) void vmm_context_init_domain(struct vmm_domain *domain)
{ {
asm volatile ("mrc p15, 0, %0, c3, c0\n" : "=r" (guest_domain_val)); asm volatile ("mrc p15, 0, %0, c3, c0\n" : "=r" (guest_domain_val));