[finsh] Add .name section for exported cmd and variables.

This commit is contained in:
Bernard Xiong 2015-09-02 12:07:58 +08:00
parent df0c6a9e3a
commit 1079727afb
1 changed files with 4 additions and 4 deletions

View File

@ -229,8 +229,8 @@ struct finsh_sysvar* finsh_sysvar_lookup(const char* name);
#else
#define FINSH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
const char __fsym_##cmd##_name[] = #cmd; \
const char __fsym_##cmd##_desc[] = #desc; \
const char __fsym_##cmd##_name[] SECTION(".name") = #cmd; \
const char __fsym_##cmd##_desc[] SECTION(".name") = #desc; \
const struct finsh_syscall __fsym_##cmd SECTION("FSymTab")= \
{ \
__fsym_##cmd##_name, \
@ -239,8 +239,8 @@ struct finsh_sysvar* finsh_sysvar_lookup(const char* name);
};
#define FINSH_VAR_EXPORT(name, type, desc) \
const char __vsym_##name##_name[] = #name; \
const char __vsym_##name##_desc[] = #desc; \
const char __vsym_##name##_name[] SECTION(".name") = #name; \
const char __vsym_##name##_desc[] SECTION(".name") = #desc; \
const struct finsh_sysvar __vsym_##name SECTION("VSymTab")= \
{ \
__vsym_##name##_name, \