From 1079727afbe7c0f0afa9eff629b8afe7d7266fda Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Wed, 2 Sep 2015 12:07:58 +0800 Subject: [PATCH] [finsh] Add .name section for exported cmd and variables. --- components/finsh/finsh.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h index d134422aa..4f3a887bc 100644 --- a/components/finsh/finsh.h +++ b/components/finsh/finsh.h @@ -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, \