source: anotherchoice/tags/jsp-1.4.4-full-UTF8/config/nios2/altera_dev_board/nios2elf.l@ 26

Last change on this file since 26 was 26, checked in by ykominami, 12 years ago

initial

File size: 8.7 KB
RevLine 
[26]1MEMORY
2{
3 reset : ORIGIN = 0x00000000, LENGTH = 32
4 ext_flash : ORIGIN = 0x00000020, LENGTH = 8388576
5 ext_ram : ORIGIN = 0x00800000, LENGTH = 1048576
6 onchip_ram_64_kbytes : ORIGIN = 0x00900000, LENGTH = 65536
7 sdram_UNUSED : ORIGIN = 0x01000000, LENGTH = 32
8 sdram : ORIGIN = 0x01000020, LENGTH = 16777184
9}
10
11 /* Define symbols for each memory base-address */
12 __alt_mem_ext_flash = 0x00000000 ;
13 __alt_mem_ext_ram = 0x00800000 ;
14 __alt_mem_onchip_ram_64_kbytes = 0x00900000 ;
15 __alt_mem_sdram = 0x01000000 ;
16
17PROVIDE(_hardware_init_hook = 0);
18PROVIDE(_software_init_hook = 0);
19PROVIDE(software_term_hook = 0);
20PROVIDE( __alt_data_end = 0x02000000 );
21
22OUTPUT_FORMAT( "elf32-littlenios2",
23 "elf32-littlenios2",
24 "elf32-littlenios2" )
25OUTPUT_ARCH( nios2 )
26ENTRY( _start )
27
28/* Do we need any of these for elf?
29 __DYNAMIC = 0;
30 */
31
32SECTIONS
33{
34 .entry :
35 {
36 KEEP (*(.entry))
37 } > reset
38
39 .exceptions :
40 {
41 . = ALIGN(0x20);
42 *(.irq)
43 KEEP (*(.exceptions));
44 } > sdram
45
46 .text :
47 {
48 /*
49 * All code sections are merged into the text output section, along with
50 * the read only data sections.
51 *
52 */
53
54 PROVIDE (stext = ABSOLUTE(.));
55
56 *(.interp)
57 *(.hash)
58 *(.dynsym)
59 *(.dynstr)
60 *(.gnu.version)
61 *(.gnu.version_d)
62 *(.gnu.version_r)
63 *(.rel.init)
64 *(.rela.init)
65 *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
66 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
67 *(.rel.fini)
68 *(.rela.fini)
69 *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
70 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
71 *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
72 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
73 *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
74 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
75 *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
76 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
77 *(.rel.ctors)
78 *(.rela.ctors)
79 *(.rel.dtors)
80 *(.rela.dtors)
81 *(.rel.got)
82 *(.rela.got)
83 *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
84 *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
85 *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
86 *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
87 *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
88 *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
89 *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
90 *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
91 *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
92 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
93 *(.rel.plt)
94 *(.rela.plt)
95
96 KEEP (*(.init))
97 *(.plt)
98 *(.text .stub .text.* .gnu.linkonce.t.*)
99
100 /* .gnu.warning sections are handled specially by elf32.em. */
101
102 *(.gnu.warning.*)
103 KEEP (*(.fini))
104 PROVIDE (__etext = ABSOLUTE(.));
105 PROVIDE (_etext = ABSOLUTE(.));
106 PROVIDE (etext = ABSOLUTE(.));
107
108 *(.eh_frame_hdr)
109 /* Ensure the __preinit_array_start label is properly aligned. We
110 could instead move the label definition inside the section, but
111 the linker would then create the section even if it turns out to
112 be empty, which isn't pretty. */
113 . = ALIGN(32 / 8);
114 PROVIDE (__preinit_array_start = ABSOLUTE(.));
115 *(.preinit_array)
116 PROVIDE (__preinit_array_end = ABSOLUTE(.));
117 PROVIDE (__init_array_start = ABSOLUTE(.));
118 *(.init_array)
119 PROVIDE (__init_array_end = ABSOLUTE(.));
120 PROVIDE (__fini_array_start = ABSOLUTE(.));
121 *(.fini_array)
122 PROVIDE (__fini_array_end = ABSOLUTE(.));
123 SORT(CONSTRUCTORS)
124 KEEP (*(.eh_frame))
125 *(.gcc_except_table)
126 *(.dynamic)
127
128 /* gcc normally uses crtbegin.o to find the start of
129 the constructors instead nios2 use crtdotors.o,
130 so we make sure it is
131 first. Because this is a wildcard, it
132 doesn't matter if the user does not
133 actually link against crtdotors.o; the
134 linker won't look for a file to match a
135 wildcard. The wildcard also means that it
136 doesn't matter which directory crtdotors.o
137 is in. */
138 KEEP (*crtdotors.o(.ctors))
139 /* We don't want to include the .ctor section from
140 from the crtendtors (gcc normally uses crtend.o)
141 file until after the sorted ctors.
142 The .ctor section from the crtendtors file contains the
143 end of ctors marker and it must be last */
144 KEEP (*(EXCLUDE_FILE (*crtendtors.o ) .ctors))
145 KEEP (*(SORT(.ctors.*)))
146 KEEP (*(.ctors))
147 KEEP (*crtdotors.o(.dtors))
148 KEEP (*(EXCLUDE_FILE (*crtendtors.o ) .dtors))
149 KEEP (*(SORT(.dtors.*)))
150 KEEP (*(.dtors))
151 KEEP (*(.jcr))
152 } > sdram =0x0001883a /* NOP on Nios2 */
153
154 .rodata :
155 {
156 . = ALIGN(32 / 8);
157 *(.rodata .rodata.* .gnu.linkonce.r.*)
158 *(.rodata1)
159 } > sdram
160
161 .rwdata :
162 {
163 . = ALIGN(32 / 8);
164 *(.got.plt) *(.got)
165 *(.data1)
166 *(.data .data.* .gnu.linkonce.d.*)
167
168 _gp = ABSOLUTE(. + 0x7ff0);
169 PROVIDE(gp = _gp);
170
171 *(.sdata .sdata.* .gnu.linkonce.s.*)
172 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
173
174 . = ALIGN(32 / 8);
175 _edata = ABSOLUTE(.);
176 PROVIDE (edata = ABSOLUTE(.));
177 } > sdram
178
179 .bss :
180 {
181 __bss_start = ABSOLUTE(.);
182 PROVIDE (__sbss_start = ABSOLUTE(.));
183 PROVIDE (___sbss_start = ABSOLUTE(.));
184
185 *(.dynsbss)
186 *(.sbss .sbss.* .gnu.linkonce.sb.*)
187 *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
188 *(.scommon)
189
190 PROVIDE (__sbss_end = ABSOLUTE(.));
191 PROVIDE (___sbss_end = ABSOLUTE(.));
192
193 *(.dynbss)
194 *(.bss .bss.* .gnu.linkonce.b.*)
195 *(COMMON)
196
197 . = ALIGN(32 / 8);
198 __bss_end = ABSOLUTE(.);
199 } > sdram
200
201 /*
202 * One output section for each of the available partitions. These are not
203 * used by default, but can be used by users applications using the .section
204 * directive.
205 *
206 * The memory partition used for the heap is treated in special way, i.e. a
207 * symbol is added to point to the heap start.
208 *
209 */
210
211 .ext_flash :
212 {
213 PROVIDE (_alt_partition_ext_flash_start = ABSOLUTE(.));
214 *(.ext_flash)
215 . = ALIGN(32 / 8);
216 PROVIDE (_alt_partition_ext_flash_end = ABSOLUTE(.));
217 } > ext_flash
218
219 .ext_ram :
220 {
221 PROVIDE (_alt_partition_ext_ram_start = ABSOLUTE(.));
222 *(.ext_ram)
223 . = ALIGN(32 / 8);
224 PROVIDE (_alt_partition_ext_ram_end = ABSOLUTE(.));
225 } > ext_ram
226
227 .onchip_ram_64_kbytes :
228 {
229 PROVIDE (_alt_partition_onchip_ram_64_kbytes_start = ABSOLUTE(.));
230 *(.onchip_ram_64_kbytes)
231 . = ALIGN(32 / 8);
232 PROVIDE (_alt_partition_onchip_ram_64_kbytes_end = ABSOLUTE(.));
233 } > onchip_ram_64_kbytes
234
235 .sdram :
236 {
237 PROVIDE (_alt_partition_sdram_start = ABSOLUTE(.));
238 *(.sdram)
239 . = ALIGN(32 / 8);
240 PROVIDE (_alt_partition_sdram_end = ABSOLUTE(.));
241 _end = ABSOLUTE(.);
242 PROVIDE (end = ABSOLUTE(.));
243 } > sdram
244
245 /*
246 * Stabs debugging sections.
247 *
248 */
249
250 .stab 0 : { *(.stab) }
251 .stabstr 0 : { *(.stabstr) }
252 .stab.excl 0 : { *(.stab.excl) }
253 .stab.exclstr 0 : { *(.stab.exclstr) }
254 .stab.index 0 : { *(.stab.index) }
255 .stab.indexstr 0 : { *(.stab.indexstr) }
256 .comment 0 : { *(.comment) }
257 /* DWARF debug sections.
258 Symbols in the DWARF debugging sections are relative to the beginning
259 of the section so we begin them at 0. */
260 /* DWARF 1 */
261 .debug 0 : { *(.debug) }
262 .line 0 : { *(.line) }
263 /* GNU DWARF 1 extensions */
264 .debug_srcinfo 0 : { *(.debug_srcinfo) }
265 .debug_sfnames 0 : { *(.debug_sfnames) }
266 /* DWARF 1.1 and DWARF 2 */
267 .debug_aranges 0 : { *(.debug_aranges) }
268 .debug_pubnames 0 : { *(.debug_pubnames) }
269 /* DWARF 2 */
270 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
271 .debug_abbrev 0 : { *(.debug_abbrev) }
272 .debug_line 0 : { *(.debug_line) }
273 .debug_frame 0 : { *(.debug_frame) }
274 .debug_str 0 : { *(.debug_str) }
275 .debug_loc 0 : { *(.debug_loc) }
276 .debug_macinfo 0 : { *(.debug_macinfo) }
277 /* SGI/MIPS DWARF 2 extensions */
278 .debug_weaknames 0 : { *(.debug_weaknames) }
279 .debug_funcnames 0 : { *(.debug_funcnames) }
280 .debug_typenames 0 : { *(.debug_typenames) }
281 .debug_varnames 0 : { *(.debug_varnames) }
282}
283/* provide a pointer for the stack */
284
285
Note: See TracBrowser for help on using the repository browser.