From 34367d5eab356efade83bc1923a7be7878c852d1 Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Fri, 23 Oct 2009 06:12:16 +0000 Subject: [PATCH] add finsh information section in ld script. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@124 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/stm3210/rtconfig.h | 3 +++ bsp/stm3210/stm32_rom.ld | 29 ++++++++++++----------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/bsp/stm3210/rtconfig.h b/bsp/stm3210/rtconfig.h index a4df210729..da192b3f0c 100644 --- a/bsp/stm3210/rtconfig.h +++ b/bsp/stm3210/rtconfig.h @@ -74,6 +74,9 @@ /* the max number of cached sector */ #define DFS_CACHE_MAX_NUM 4 +/* use minilibc for gcc */ +// #define RT_USING_MINILIBC + /* SECTION: lwip, a lighwight TCP/IP protocol stack */ #define RT_USING_LWIP diff --git a/bsp/stm3210/stm32_rom.ld b/bsp/stm3210/stm32_rom.ld index ea4e23e427..f508ac8ba7 100644 --- a/bsp/stm3210/stm32_rom.ld +++ b/bsp/stm3210/stm32_rom.ld @@ -25,30 +25,23 @@ SECTIONS *(.glue_7) *(.glue_7t) - . = ALIGN(4); - _etext = .; - - /* This is used by the startup in order to initialize the .data secion */ - _sidata = _etext; - } > CODE = 0 - - .FSymTab : - { + /* section information for finsh shell */ . = ALIGN(4); __fsymtab_start = .; - *(.FSymTab) + KEEP(*(FSymTab)) __fsymtab_end = .; . = ALIGN(4); - } > CODE - - .VSymTab : - { - . = ALIGN(4); __vsymtab_start = .; - *(.VSymTab) + KEEP(*(VSymTab)) __vsymtab_end = .; . = ALIGN(4); - } > CODE + + . = ALIGN(4); + _etext = .; + + /* This is used by the startup in order to initialize the .data secion */ + _sidata = _etext; + } > CODE = 0 /* .data section which is used for initialized data */ @@ -80,6 +73,8 @@ SECTIONS /* This is used by the startup in order to initialize the .bss secion */ _ebss = . ; _estack = .; + + *(.bss.init) } > DATA __bss_end = .; -- GitLab