]> rtime.felk.cvut.cz Git - lincan.git/blob - embedded/board/arm/lpc17xx-common/libs/ldscripts/lpc17xx-base.ld-app
Contributed support for LCP17xx devices and PiKRON's LMC1 board.
[lincan.git] / embedded / board / arm / lpc17xx-common / libs / ldscripts / lpc17xx-base.ld-app
1 /***********************************************************************/
2 /*                                                                     */
3 /*  ROM.ld:  Linker Script File                                        */
4 /*                                                                     */
5 /***********************************************************************/
6
7 ENTRY(g_pfnVectors)
8
9 PROVIDE (_setup_board = 0);
10
11 /* SECTION command : Define mapping of input sections */
12 /* into output sections. */
13
14 SECTIONS
15 {
16         /******************************************/
17         /* code section */
18
19         /* "normal" code */
20         
21         .text :
22         {
23                 KEEP(*(.isr_vector .isr_vector.*))
24                 *(.text .text.*)
25                 *(.gnu.linkonce.t.*)
26                 *(.glue_7)
27                 *(.glue_7t)
28                 *(.gcc_except_table)
29                 *(.rodata .rodata*)
30                 *(.gnu.linkonce.r.*)
31         } >FLASHAPP
32
33         /******************************************/
34         /* .ctors .dtors are used for c++ constructors/destructors */
35         .ctors :
36         {
37                 . = ALIGN(4);
38                 PROVIDE(__ctors_start = .);
39                 KEEP(*(SORT(.ctors.*)))
40                 KEEP(*(.ctors))
41                 PROVIDE(__ctors_end = .);
42         } >FLASHAPP
43
44         .dtors :
45         {
46                 . = ALIGN(4);
47                 PROVIDE(__dtors_start = .);
48                 KEEP(*(SORT(.dtors.*)))
49                 KEEP(*(.dtors))
50                 PROVIDE(__dtors_end = .);
51
52                 . = ALIGN(4);
53                 /* End Of .text section */
54                 _etext = .;
55                 _sifastcode = .;
56         } >FLASHAPP
57         
58
59         .keyval :
60         {
61                 PROVIDE (_keyval_start = .);
62                 PROVIDE (_keyval_page_len = KEYVAL_PAGE_LEN );
63         }> KEYVAL
64
65         .app :
66         {
67                 PROVIDE (_mem_app_start = . );
68           } > FLASHAPP
69
70         .irqarea (NOLOAD):
71         {
72                 . = ALIGN (256);
73                 *(.irqarea .irqarea.*)
74
75         } >IRAM0
76
77         /**************************************************/
78         /* fastcode - copied at startup & executed in RAM */
79
80         .fastcode :
81         {
82           . = ALIGN (4);
83           _sfastcode = . ;
84
85           *(.glue_7t) *(.glue_7)
86           *(.fastcode)
87           
88           /* add other modules here ... */
89
90           . = ALIGN (4);
91           _efastcode = . ;
92           _sidata = .;
93         } >IRAM0 AT>FLASHAPP
94
95         /******************************************/
96         /* This used for USB RAM section */
97         .usbram (NOLOAD):
98         {
99                 _usbram = . ;
100                 *(.usbram)
101                 . = ALIGN(4);
102                 _eusbram = . ;
103                 _usbram_end = . ;
104         } > IRAM1
105
106         /******************************************/
107         /* data section */
108         .data :
109         {
110                 _sidata = LOADADDR (.data);
111                 . = ALIGN(4);
112                 _sdata = .;
113
114                 *(vtable vtable.*)
115                 *(.data .data.*)
116                 *(.gnu.linkonce.d*)
117
118                 . = ALIGN(4);
119                 _edata = . ;
120         } >IRAM0 AT>FLASHAPP
121
122         /******************************************/
123         /* For no-init variables section */
124         .bss (NOLOAD) :
125         {
126                 . = ALIGN(4);
127                 _sbss = . ;
128
129                 *(.bss .bss.*)
130                 *(.gnu.linkonce.b*)
131                 *(COMMON)
132
133                 . = ALIGN(4);
134                 _ebss = . ;
135
136                 . = ALIGN(4);
137                 _end = . ;
138                 PROVIDE (end = .);
139         } >IRAM0
140
141         .stack :
142         {
143              _stack = .;
144         } >STACK
145
146
147         /******************************************/
148         /* Stabs debugging sections.  */
149         .stab          0 : { *(.stab) }
150         .stabstr       0 : { *(.stabstr) }
151         .stab.excl     0 : { *(.stab.excl) }
152         .stab.exclstr  0 : { *(.stab.exclstr) }
153         .stab.index    0 : { *(.stab.index) }
154         .stab.indexstr 0 : { *(.stab.indexstr) }
155         /* .comment       0 : { *(.comment) } */
156         /* DWARF debug sections.
157          Symbols in the DWARF debugging sections are relative to the beginning
158          of the section so we begin them at 0.  */
159         /* DWARF 1 */
160         .debug          0 : { *(.debug) }
161         .line           0 : { *(.line) }
162         /* GNU DWARF 1 extensions */
163         .debug_srcinfo  0 : { *(.debug_srcinfo) }
164         .debug_sfnames  0 : { *(.debug_sfnames) }
165         /* DWARF 1.1 and DWARF 2 */
166         .debug_aranges  0 : { *(.debug_aranges) }
167         .debug_pubnames 0 : { *(.debug_pubnames) }
168         /* DWARF 2 */
169         .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
170         .debug_abbrev   0 : { *(.debug_abbrev) }
171         .debug_line     0 : { *(.debug_line) }
172         .debug_frame    0 : { *(.debug_frame) }
173         .debug_str      0 : { *(.debug_str) }
174         .debug_loc      0 : { *(.debug_loc) }
175         .debug_macinfo  0 : { *(.debug_macinfo) }
176         /* SGI/MIPS DWARF 2 extensions */
177         .debug_weaknames 0 : { *(.debug_weaknames) }
178         .debug_funcnames 0 : { *(.debug_funcnames) }
179         .debug_typenames 0 : { *(.debug_typenames) }
180         .debug_varnames  0 : { *(.debug_varnames) }
181 }