[finsh] add RT_USED to macro FINSH_FUNCTION_EXPORT_CMD and FINSH_VAR_EXPORT
@@ -105,7 +105,7 @@ struct finsh_syscall* finsh_syscall_lookup(const char* name);
#define FINSH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
const char __fsym_##cmd##_name[] SECTION(".rodata.name") = #cmd; \
const char __fsym_##cmd##_desc[] SECTION(".rodata.name") = #desc; \
- const struct finsh_syscall __fsym_##cmd SECTION("FSymTab")= \
+ RT_USED const struct finsh_syscall __fsym_##cmd SECTION("FSymTab")= \
{ \
__fsym_##cmd##_name, \
__fsym_##cmd##_desc, \
@@ -115,7 +115,7 @@ struct finsh_syscall* finsh_syscall_lookup(const char* name);
#define FINSH_VAR_EXPORT(name, type, desc) \
const char __vsym_##name##_name[] SECTION(".rodata.name") = #name; \
const char __vsym_##name##_desc[] SECTION(".rodata.name") = #desc; \
- const struct finsh_sysvar __vsym_##name SECTION("VSymTab")= \
+ RT_USED const struct finsh_sysvar __vsym_##name SECTION("VSymTab")= \
{ \
__vsym_##name##_name, \
__vsym_##name##_desc, \
@@ -168,7 +168,7 @@ struct finsh_syscall* finsh_syscall_lookup(const char* name);
#else
#define FINSH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
const char __fsym_##cmd##_name[] = #cmd; \
- const struct finsh_syscall __fsym_##cmd SECTION("FSymTab")= \
+ RT_USED const struct finsh_syscall __fsym_##cmd SECTION("FSymTab")= \
{ \
__fsym_##cmd##_name, \
(syscall_func)&name \
@@ -176,7 +176,7 @@ struct finsh_syscall* finsh_syscall_lookup(const char* name);
#define FINSH_VAR_EXPORT(name, type, desc) \
const char __vsym_##name##_name[] = #name; \
- const struct finsh_sysvar __vsym_##name SECTION("VSymTab")= \
+ RT_USED const struct finsh_sysvar __vsym_##name SECTION("VSymTab")= \
{ \
__vsym_##name##_name, \
type, \
