add finsh information section in ld script.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@125 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong 2009-10-23 06:14:21 +00:00
parent 34367d5eab
commit d3e4d4697b
1 changed files with 60 additions and 62 deletions

View File

@ -29,10 +29,6 @@
extern char rt_serial_getc(void); extern char rt_serial_getc(void);
#endif #endif
#define FINSH_USING_HISTORY #define FINSH_USING_HISTORY
#if defined(__CC_ARM) /* ARMCC compiler */ #if defined(__CC_ARM) /* ARMCC compiler */
@ -47,7 +43,7 @@ extern char rt_serial_getc(void);
#pragma section="FSymTab" #pragma section="FSymTab"
#pragma section="VSymTab" #pragma section="VSymTab"
#endif #endif
#elif defined(__GCC__) #elif defined(__GNUC__)
#ifdef FINSH_USING_SYMTAB #ifdef FINSH_USING_SYMTAB
extern int __fsymtab_start; extern int __fsymtab_start;
extern int __fsymtab_end; extern int __fsymtab_end;
@ -441,6 +437,8 @@ void finsh_system_init()
finsh_system_var_init(__section_begin("VSymTab"), finsh_system_var_init(__section_begin("VSymTab"),
__section_end("VSymTab")); __section_end("VSymTab"));
#elif defined (__GNUC__) /* GNU GCC Compiler */ #elif defined (__GNUC__) /* GNU GCC Compiler */
finsh_system_function_init(&__fsymtab_start, &__fsymtab_end);
finsh_system_var_init(&__vsymtab_start, &__vsymtab_start);
#endif #endif
#endif #endif