summaryrefslogtreecommitdiff
path: root/bsp/lpc2148
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/lpc2148
parent51532ae425b4b468ba78c956ef95f214dd427c1b (diff)
update linker script for components auto initial.
Diffstat (limited to 'bsp/lpc2148')
-rw-r--r--bsp/lpc2148/lpc2148_rom.ld150
1 files changed, 78 insertions, 72 deletions
diff --git a/bsp/lpc2148/lpc2148_rom.ld b/bsp/lpc2148/lpc2148_rom.ld
index 2dbe82514f..3bcd1c7165 100644
--- a/bsp/lpc2148/lpc2148_rom.ld
+++ b/bsp/lpc2148/lpc2148_rom.ld
@@ -4,8 +4,8 @@ OUTPUT_ARCH(arm)
MEMORY
{
- CODE (rx) : ORIGIN = 0x00000000, LENGTH = 512k /* 512KB flash */
- DATA (rw) : ORIGIN = 0x40000000, LENGTH = 32k /* 32K sram */
+ CODE (rx) : ORIGIN = 0x00000000, LENGTH = 512k /* 512KB flash */
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 32k /* 32K sram */
}
ENTRY(_start)
@@ -18,49 +18,55 @@ _svc_tack_size = 0x400;
SECTIONS
{
- . = 0;
+ . = 0;
- . = ALIGN(4);
- .text :
- {
- *(.init)
- *(.text)
- *(.rodata)
- *(.rodata*)
- *(.glue_7)
- *(.glue_7t)
+ . = ALIGN(4);
+ .text :
+ {
+ *(.init)
+ *(.text)
+ *(.rodata)
+ *(.rodata*)
+ *(.glue_7)
+ *(.glue_7t)
+
+ /* 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);
+ . = ALIGN(4);
+ __rt_init_start = .;
+ KEEP(*(SORT(.rti_fn*)))
+ __rt_init_end = .;
+ . = ALIGN(4);
- } >CODE
+ } >CODE
- . = ALIGN(4);
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_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
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } > CODE
- __end_of_text__ = .;
+ __end_of_text__ = .;
/* .ARM.exidx is sorted, so has to go in its own output section. */
__exidx_start = .;
@@ -73,7 +79,7 @@ SECTIONS
} > CODE
__exidx_end = .;
- /* .data section which is used for initialized data */
+ /* .data section which is used for initialized data */
.data : AT (_sidata)
{
. = ALIGN(4);
@@ -88,36 +94,36 @@ 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
- .stack :
- {
- . = ALIGN(4);
- _undefined_stack_base = .;
- . = . + _undefined_tack_size;
- _undefined_stack_top = .;
-
- _abort_stack_base = .;
- . = . + _abort_tack_size;
- _abort_stack_top = .;
-
- _fiq_stack_base = .;
- . = . + _fiq_tack_size;
- _fiq_stack_top = .;
-
- _irq_stack_base = .;
- . = . + _irq_tack_size;
- _irq_stack_top = .;
-
- _svc_stack_base = .;
- . = . + _svc_tack_size;
- _svc_stack_top = .;
- } >DATA
+ .stack :
+ {
+ . = ALIGN(4);
+ _undefined_stack_base = .;
+ . = . + _undefined_tack_size;
+ _undefined_stack_top = .;
+
+ _abort_stack_base = .;
+ . = . + _abort_tack_size;
+ _abort_stack_top = .;
+
+ _fiq_stack_base = .;
+ . = . + _fiq_tack_size;
+ _fiq_stack_top = .;
+
+ _irq_stack_base = .;
+ . = . + _irq_tack_size;
+ _irq_stack_top = .;
+
+ _svc_stack_base = .;
+ . = . + _svc_tack_size;
+ _svc_stack_top = .;
+ } >DATA
__bss_start = .;
.bss :
@@ -135,8 +141,8 @@ SECTIONS
} > DATA
__bss_end = .;
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(32 / 8);
+ /* Align here to ensure that the .bss section occupies space up to
+ _end. Align after .bss to ensure correct alignment even if the
+ .bss section disappears because there are no input sections. */
+ . = ALIGN(32 / 8);
}