OSDN Git Service

LPC4330i存部のコードを追加。ビルドが通る。
[toppersasp4lpc/asp.git] / asp / target / lpc4330_generic_gcc / lpc4330_sram.ld
1 /*
2 * LPC4330のSRAM上でプログラムを動かすための最低限度のLDファイル。
3 * すべての資源をSRAM上に配置する。Sourcery G++ 2010q1-188の
4 * Generic-m-hosted.ldを修正して使用。
5 */
6
7 OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
8 ENTRY(_start)
9 SEARCH_DIR(.)
10
11 MEMORY
12 {
13   ram (rx) :  ORIGIN = 0x10000000, LENGTH = 96K
14 }
15
16
17 /* Provide fall-back values */
18 PROVIDE( __data_start = 0x0 );                          /* 以下の3シンボルはダミーだが、0でなければならない */
19 PROVIDE( __idata_start = 0x0 );
20 PROVIDE( __idata_end = 0x0 );
21 PROVIDE( _vector_start = 0x0 );                         /* SRAM版とROM版でコードを共有するためのダミー*/
22 PROVIDE( _vector_end = 0x0 );
23
24
25 PROVIDE(hardware_init_hook = 0);
26 PROVIDE(software_init_hook = 0);
27 PROVIDE(software_term_hook = 0);
28 STARTUP(start.o)
29
30
31 SECTIONS
32 {
33   .text :
34   {
35         _vector_start_lma = .;
36         *( .vector )            /* RAM領域の先頭に割り当てているのは、 256byte境界を守るため */
37     *(.text .text.* .gnu.linkonce.t.*)
38     *(.plt)
39     *(.gnu.warning)
40     *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
41
42     *(.ARM.extab* .gnu.linkonce.armextab.*)
43     *(.gcc_except_table)
44   } >ram
45   
46   .eh_frame_hdr : ALIGN (4)
47   {
48     KEEP (*(.eh_frame_hdr))
49   } >ram
50   
51   .eh_frame : ALIGN (4)
52   {
53     KEEP (*(.eh_frame))
54   } >ram
55   
56   /* .ARM.exidx is sorted, so has to go in its own output section.  */
57   PROVIDE_HIDDEN (__exidx_start = .);
58   .ARM.exidx :
59   {
60     *(.ARM.exidx* .gnu.linkonce.armexidx.*)
61   } >ram
62
63   PROVIDE_HIDDEN (__exidx_end = .);
64   .rodata : ALIGN (4)
65   {
66     *(.rodata .rodata.* .gnu.linkonce.r.*)
67
68     . = ALIGN(4);
69     KEEP(*(.init))
70
71     . = ALIGN(4);
72     __preinit_array_start = .;
73     KEEP (*(.preinit_array))
74     __preinit_array_end = .;
75
76     . = ALIGN(4);
77     __init_array_start = .;
78     KEEP (*(SORT(.init_array.*)))
79     KEEP (*(.init_array))
80     __init_array_end = .;
81
82     . = ALIGN(4);
83     KEEP(*(.fini))
84
85     . = ALIGN(4);
86     __fini_array_start = .;
87     KEEP (*(.fini_array))
88     KEEP (*(SORT(.fini_array.*)))
89     __fini_array_end = .;
90
91     . = ALIGN(0x4);
92     KEEP (*crtbegin.o(.ctors))
93     KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
94     KEEP (*(SORT(.ctors.*)))
95     KEEP (*crtend.o(.ctors))
96
97     . = ALIGN(0x4);
98     KEEP (*crtbegin.o(.dtors))
99     KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
100     KEEP (*(SORT(.dtors.*)))
101     KEEP (*crtend.o(.dtors))
102
103     . = ALIGN (8);
104     _etext = .;
105   } >ram
106
107   .data : ALIGN (8)
108   {
109     KEEP(*(.jcr))
110     *(.got.plt) *(.got)
111     *(.shdata)
112     *(.data .data.* .gnu.linkonce.d.*)
113     . = ALIGN (8);
114     *(.ram)
115     _edata = .;
116   } >ram
117   
118   .bss :
119   {
120     __bss_start = .;
121     *(.shbss)
122     *(.bss .bss.* .gnu.linkonce.b.*)
123     *(COMMON)
124     . = ALIGN (8);
125     *(.ram.b .bss.ram)
126     _end = .;
127     __end = .;
128     __bss_end = .;
129   } >ram
130
131   .stab 0 (NOLOAD) : { *(.stab) }
132   .stabstr 0 (NOLOAD) : { *(.stabstr) }
133   /* DWARF debug sections.
134    * Symbols in the DWARF debugging sections are relative to
135    * the beginning of the section so we begin them at 0.
136    */
137   /* DWARF 1 */
138   .debug          0 : { *(.debug) }
139   .line           0 : { *(.line) }
140   /* GNU DWARF 1 extensions */
141   .debug_srcinfo  0 : { *(.debug_srcinfo) }
142   .debug_sfnames  0 : { *(.debug_sfnames) }
143   /* DWARF 1.1 and DWARF 2 */
144   .debug_aranges  0 : { *(.debug_aranges) }
145   .debug_pubnames 0 : { *(.debug_pubnames) }
146   /* DWARF 2 */
147   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
148   .debug_abbrev   0 : { *(.debug_abbrev) }
149   .debug_line     0 : { *(.debug_line) }
150   .debug_frame    0 : { *(.debug_frame) }
151   .debug_str      0 : { *(.debug_str) }
152   .debug_loc      0 : { *(.debug_loc) }
153   .debug_macinfo  0 : { *(.debug_macinfo) }
154   /* DWARF 2.1 */
155   .debug_ranges   0 : { *(.debug_ranges) }
156   /* SGI/MIPS DWARF 2 extensions */
157   .debug_weaknames 0 : { *(.debug_weaknames) }
158   .debug_funcnames 0 : { *(.debug_funcnames) }
159   .debug_typenames 0 : { *(.debug_typenames) }
160   .debug_varnames  0 : { *(.debug_varnames) }
161
162   .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
163   .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
164   /DISCARD/ : { *(.note.GNU-stack) }
165 }