summaryrefslogtreecommitdiff
path: root/bsp/sam7x
diff options
context:
space:
mode:
authoraozima <[email protected]>2013-07-11 23:07:16 +0800
committeraozima <[email protected]>2013-07-11 23:07:16 +0800
commitcc8301d0f17210cf0e74232b8d58cde81e28e5e9 (patch)
treee1bb093782f169b5a8f41ec7442d8ddad8698b61 /bsp/sam7x
parent51532ae425b4b468ba78c956ef95f214dd427c1b (diff)
update linker script for components auto initial.
Diffstat (limited to 'bsp/sam7x')
-rw-r--r--bsp/sam7x/sam7x_rom.ld84
1 files changed, 45 insertions, 39 deletions
diff --git a/bsp/sam7x/sam7x_rom.ld b/bsp/sam7x/sam7x_rom.ld
index 41522bc2cd..2ceb8ee9e1 100644
--- a/bsp/sam7x/sam7x_rom.ld
+++ b/bsp/sam7x/sam7x_rom.ld
@@ -2,48 +2,54 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
MEMORY
{
- CODE (rx) : ORIGIN = 0x00100000, LENGTH = 0x00040000
- /* DATA (rw) : ORIGIN = 0x00200000, LENGTH = 0x00010000 */
- DATA (rw) : ORIGIN = 0x00204000, LENGTH = 0x0000C000
+ CODE (rx) : ORIGIN = 0x00100000, LENGTH = 0x00040000
+ /* DATA (rw) : ORIGIN = 0x00200000, LENGTH = 0x00010000 */
+ DATA (rw) : ORIGIN = 0x00204000, LENGTH = 0x0000C000
}
ENTRY(_start)
SECTIONS
{
- .text :
- {
- *(.init)
- *(.text)
- *(.rodata)
+ .text :
+ {
+ *(.init)
+ *(.text)
+ *(.rodata)
- /* section information for finsh shell */
- . = ALIGN(4);
- __fsymtab_start = .;
- KEEP(*(FSymTab))
- __fsymtab_end = .;
- . = ALIGN(4);
- __vsymtab_start = .;
- KEEP(*(VSymTab))
- __vsymtab_end = .;
- . = ALIGN(4);
+ /* section information for finsh shell */
+ . = ALIGN(4);
+ __fsymtab_start = .;
+ KEEP(*(FSymTab))
+ __fsymtab_end = .;
+ . = ALIGN(4);
+ __vsymtab_start = .;
+ KEEP(*(VSymTab))
+ __vsymtab_end = .;
+ . = ALIGN(4);
- } > CODE = 0
+ . = ALIGN(4);
+ __rt_init_start = .;
+ KEEP(*(SORT(.rti_fn*)))
+ __rt_init_end = .;
+ . = ALIGN(4);
- . = ALIGN(4);
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_end__ = .);
- } > CODE
+ } > CODE = 0
- .dtors :
- {
- PROVIDE(__dtors_start__ = .);
- KEEP(*(SORT(.dtors.*)))
- KEEP(*(.dtors))
- PROVIDE(__dtors_end__ = .);
- } > CODE
+ . = ALIGN(4);
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } > CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } > CODE
/* .ARM.exidx is sorted, so has to go in its own output section. */
__exidx_start = .;
@@ -71,12 +77,12 @@ SECTIONS
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
} >DATA
- __data_end = .;
+ __data_end = .;
- .noinit :
- {
- *(.bss.noinit)
- } > DATA
+ .noinit :
+ {
+ *(.bss.noinit)
+ } > DATA
__bss_start = .;
.bss :