提交 4853d4f5 编写于 作者: B bernard.xiong

update the GNU GCC link script.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1284 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 88b31992
...@@ -24,6 +24,7 @@ SECTIONS ...@@ -24,6 +24,7 @@ SECTIONS
*(.rodata*) *(.rodata*)
*(.glue_7) *(.glue_7)
*(.glue_7t) *(.glue_7t)
*(.ARM.extab* .gnu.linkonce.armextab.*)
/* section information for finsh shell */ /* section information for finsh shell */
. = ALIGN(4); . = ALIGN(4);
...@@ -36,15 +37,21 @@ SECTIONS ...@@ -36,15 +37,21 @@ SECTIONS
__vsymtab_end = .; __vsymtab_end = .;
. = ALIGN(4); . = ALIGN(4);
. = ALIGN(4);
_etext = .; _etext = .;
} > CODE = 0
/* .ARM.exidx is sorted, so has to go in its own output section. */
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
/* This is used by the startup in order to initialize the .data secion */ /* This is used by the startup in order to initialize the .data secion */
_sidata = _etext; _sidata = .;
} > CODE = 0 } > CODE
__exidx_end = .;
/* .data section which is used for initialized data */ /* .data section which is used for initialized data */
.data : AT (_sidata) .data : AT (_sidata)
{ {
. = ALIGN(4); . = ALIGN(4);
......
# toolchains options # toolchains options
ARCH='arm' ARCH='arm'
CPU='lm3s' CPU='lm3s'
CROSS_TOOL = 'keil' CROSS_TOOL = 'gcc'
if CROSS_TOOL == 'gcc': if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc' PLATFORM = 'gcc'
EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
...@@ -25,7 +24,7 @@ if PLATFORM == 'gcc': ...@@ -25,7 +24,7 @@ if PLATFORM == 'gcc':
OBJCPY = PREFIX + 'objcopy' OBJCPY = PREFIX + 'objcopy'
DEVICE = ' -mcpu=cortex-m3 -mthumb' DEVICE = ' -mcpu=cortex-m3 -mthumb'
CFLAGS = DEVICE + ' -Dsourcerygxx' CFLAGS = DEVICE + ' -Dsourcerygxx -ffunction-sections -fdata-sections'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-lm3s.map,-cref,-u,Reset_Handler -T lm3s_rom.ld' LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-lm3s.map,-cref,-u,Reset_Handler -T lm3s_rom.ld'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册