1/* This linker script generated from xt-genldscripts.tpp for LSP .\min-rt */
2/* Linker Script for ld -n */
3MEMORY
4{
5  dsp_core_seg :                      	org = 0x20400000, len = 0x180000
6  dram0_0_seg :                       	org = 0x24000000, len = 0x10000
7  iram0_0_seg :                       	org = 0x24020000, len = 0x400
8  iram0_1_seg :                       	org = 0x24020400, len = 0x17C
9  iram0_2_seg :                       	org = 0x2402057C, len = 0x20
10  iram0_3_seg :                       	org = 0x2402059C, len = 0x20
11  iram0_4_seg :                       	org = 0x240205BC, len = 0x20
12  iram0_5_seg :                       	org = 0x240205DC, len = 0x20
13  iram0_6_seg :                       	org = 0x240205FC, len = 0x20
14  iram0_7_seg :                       	org = 0x2402061C, len = 0x20
15  iram0_8_seg :                       	org = 0x2402063C, len = 0xF9C4
16}
17
18PHDRS
19{
20  dsp_core_phdr PT_LOAD;
21  dsp_core_bss_phdr PT_LOAD;
22  dram0_0_phdr PT_LOAD;
23  dram0_0_bss_phdr PT_LOAD;
24  iram0_0_phdr PT_LOAD;
25  iram0_1_phdr PT_LOAD;
26  iram0_2_phdr PT_LOAD;
27  iram0_3_phdr PT_LOAD;
28  iram0_4_phdr PT_LOAD;
29  iram0_5_phdr PT_LOAD;
30  iram0_6_phdr PT_LOAD;
31  iram0_7_phdr PT_LOAD;
32  iram0_8_phdr PT_LOAD;
33}
34
35
36/*  Default entry point:  */
37ENTRY(_ResetVector)
38
39
40/*  Memory boundary addresses:  */
41_memmap_mem_dsp_core_start = 0x20400000;
42_memmap_mem_dsp_core_end   = 0x20580000;
43_memmap_mem_dram0_start = 0x24000000;
44_memmap_mem_dram0_end   = 0x24010000;
45_memmap_mem_iram0_start = 0x24020000;
46_memmap_mem_iram0_end   = 0x24030000;
47
48/*  Memory segment boundary addresses:  */
49_memmap_seg_dsp_core_start = 0x20400000;
50_memmap_seg_dsp_core_max   = 0x20580000;
51_memmap_seg_dram0_0_start = 0x24000000;
52_memmap_seg_dram0_0_max   = 0x24010000;
53_memmap_seg_iram0_0_start = 0x24020000;
54_memmap_seg_iram0_0_max   = 0x24020400;
55_memmap_seg_iram0_1_start = 0x24020400;
56_memmap_seg_iram0_1_max   = 0x2402057c;
57_memmap_seg_iram0_2_start = 0x2402057c;
58_memmap_seg_iram0_2_max   = 0x2402059c;
59_memmap_seg_iram0_3_start = 0x2402059c;
60_memmap_seg_iram0_3_max   = 0x240205bc;
61_memmap_seg_iram0_4_start = 0x240205bc;
62_memmap_seg_iram0_4_max   = 0x240205dc;
63_memmap_seg_iram0_5_start = 0x240205dc;
64_memmap_seg_iram0_5_max   = 0x240205fc;
65_memmap_seg_iram0_6_start = 0x240205fc;
66_memmap_seg_iram0_6_max   = 0x2402061c;
67_memmap_seg_iram0_7_start = 0x2402061c;
68_memmap_seg_iram0_7_max   = 0x2402063c;
69_memmap_seg_iram0_8_start = 0x2402063c;
70_memmap_seg_iram0_8_max   = 0x24030000;
71
72_rom_store_table = 0;
73PROVIDE(_memmap_reset_vector = 0x24020000);
74PROVIDE(_memmap_vecbase_reset = 0x24020400);
75/* Various memory-map dependent cache attribute settings: */
76_memmap_cacheattr_wb_base = 0x00000040;
77_memmap_cacheattr_wt_base = 0x00000010;
78_memmap_cacheattr_bp_base = 0x00000020;
79_memmap_cacheattr_unused_mask = 0xFFFFFF0F;
80_memmap_cacheattr_wb_trapnull = 0x22222244;
81_memmap_cacheattr_wba_trapnull = 0x2222224F;
82_memmap_cacheattr_wbna_trapnull = 0x2222225F;
83_memmap_cacheattr_wt_trapnull = 0x2222221F;
84_memmap_cacheattr_bp_trapnull = 0x2222222F;
85_memmap_cacheattr_wb_strict = 0xFFFFFF4F;
86_memmap_cacheattr_wt_strict = 0xFFFFFF1F;
87_memmap_cacheattr_bp_strict = 0xFFFFFF2F;
88_memmap_cacheattr_wb_allvalid = 0x22222242;
89_memmap_cacheattr_wt_allvalid = 0x22222212;
90_memmap_cacheattr_bp_allvalid = 0x22222222;
91_memmap_region_map = 0x00000002;
92PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull);
93
94SECTIONS
95{
96
97  .dram0.rodata : ALIGN(4)
98  {
99    _dram0_rodata_start = ABSOLUTE(.);
100    *(.dram0.rodata)
101    *(.dram.rodata)
102    . = ALIGN (4);
103    _dram0_rodata_end = ABSOLUTE(.);
104  } >dram0_0_seg :dram0_0_phdr
105
106  .ResetVector.literal : ALIGN(4)
107  {
108    _ResetVector_literal_start = ABSOLUTE(.);
109    *(.ResetVector.literal)
110    . = ALIGN (4);
111    _ResetVector_literal_end = ABSOLUTE(.);
112  } >dram0_0_seg :dram0_0_phdr
113
114  .Level2InterruptVector.literal : ALIGN(4)
115  {
116    _Level2InterruptVector_literal_start = ABSOLUTE(.);
117    *(.Level2InterruptVector.literal)
118    . = ALIGN (4);
119    _Level2InterruptVector_literal_end = ABSOLUTE(.);
120  } >dram0_0_seg :dram0_0_phdr
121
122  .Level3InterruptVector.literal : ALIGN(4)
123  {
124    _Level3InterruptVector_literal_start = ABSOLUTE(.);
125    *(.Level3InterruptVector.literal)
126    . = ALIGN (4);
127    _Level3InterruptVector_literal_end = ABSOLUTE(.);
128  } >dram0_0_seg :dram0_0_phdr
129
130  .DebugExceptionVector.literal : ALIGN(4)
131  {
132    _DebugExceptionVector_literal_start = ABSOLUTE(.);
133    *(.DebugExceptionVector.literal)
134    . = ALIGN (4);
135    _DebugExceptionVector_literal_end = ABSOLUTE(.);
136  } >dram0_0_seg :dram0_0_phdr
137
138  .NMIExceptionVector.literal : ALIGN(4)
139  {
140    _NMIExceptionVector_literal_start = ABSOLUTE(.);
141    *(.NMIExceptionVector.literal)
142    . = ALIGN (4);
143    _NMIExceptionVector_literal_end = ABSOLUTE(.);
144  } >dram0_0_seg :dram0_0_phdr
145
146  .KernelExceptionVector.literal : ALIGN(4)
147  {
148    _KernelExceptionVector_literal_start = ABSOLUTE(.);
149    *(.KernelExceptionVector.literal)
150    . = ALIGN (4);
151    _KernelExceptionVector_literal_end = ABSOLUTE(.);
152  } >dram0_0_seg :dram0_0_phdr
153
154  .UserExceptionVector.literal : ALIGN(4)
155  {
156    _UserExceptionVector_literal_start = ABSOLUTE(.);
157    *(.UserExceptionVector.literal)
158    . = ALIGN (4);
159    _UserExceptionVector_literal_end = ABSOLUTE(.);
160  } >dram0_0_seg :dram0_0_phdr
161
162  .DoubleExceptionVector.literal : ALIGN(4)
163  {
164    _DoubleExceptionVector_literal_start = ABSOLUTE(.);
165    *(.DoubleExceptionVector.literal)
166    . = ALIGN (4);
167    _DoubleExceptionVector_literal_end = ABSOLUTE(.);
168  } >dram0_0_seg :dram0_0_phdr
169
170  .iram0.literal : ALIGN(4)
171  {
172    _iram0_literal_start = ABSOLUTE(.);
173    *(.iram0.literal)
174    *(.iram.literal)
175    *(.iram.text.literal)
176    . = ALIGN (4);
177    _iram0_literal_end = ABSOLUTE(.);
178  } >dram0_0_seg :dram0_0_phdr
179
180  .dram0.data : ALIGN(4)
181  {
182    _dram0_data_start = ABSOLUTE(.);
183    *(.dram0.data)
184    *(.dram.data)
185    . = ALIGN (4);
186    _dram0_data_end = ABSOLUTE(.);
187  } >dram0_0_seg :dram0_0_phdr
188
189  .dram0.bss (NOLOAD) : ALIGN(8)
190  {
191    . = ALIGN (8);
192    _dram0_bss_start = ABSOLUTE(.);
193    *(.dram0.bss)
194    . = ALIGN (8);
195    _dram0_bss_end = ABSOLUTE(.);
196    _memmap_seg_dram0_0_end = ALIGN(0x8);
197  } >dram0_0_seg :dram0_0_bss_phdr
198
199  NonCacheable : ALIGN(4)
200  {
201    NonCacheable_start = ABSOLUTE(.);
202    *(NonCacheable)
203    . = ALIGN (4);
204    NonCacheable_end = ABSOLUTE(.);
205    _memmap_seg_dsp_uncached_end = ALIGN(0x8);
206  } >dram0_0_seg :dram0_0_bss_phdr
207
208  _memmap_mem_dram0_max = ABSOLUTE(.);
209
210  .ResetVector.text : ALIGN(4)
211  {
212    _ResetVector_text_start = ABSOLUTE(.);
213    KEEP (*(.ResetVector.text))
214    . = ALIGN (4);
215    _ResetVector_text_end = ABSOLUTE(.);
216  } >iram0_0_seg :iram0_0_phdr
217
218  .ResetHandler.text : ALIGN(4)
219  {
220    _ResetHandler_text_start = ABSOLUTE(.);
221    *(.ResetHandler.literal .ResetHandler.text)
222    . = ALIGN (4);
223    _ResetHandler_text_end = ABSOLUTE(.);
224    _memmap_seg_iram0_0_end = ALIGN(0x8);
225  } >iram0_0_seg :iram0_0_phdr
226
227
228  .WindowVectors.text : ALIGN(4)
229  {
230    _WindowVectors_text_start = ABSOLUTE(.);
231    KEEP (*(.WindowVectors.text))
232    . = ALIGN (4);
233    _WindowVectors_text_end = ABSOLUTE(.);
234    _memmap_seg_iram0_1_end = ALIGN(0x8);
235  } >iram0_1_seg :iram0_1_phdr
236
237
238  .Level2InterruptVector.text : ALIGN(4)
239  {
240    _Level2InterruptVector_text_start = ABSOLUTE(.);
241    KEEP (*(.Level2InterruptVector.text))
242    . = ALIGN (4);
243    _Level2InterruptVector_text_end = ABSOLUTE(.);
244    _memmap_seg_iram0_2_end = ALIGN(0x8);
245  } >iram0_2_seg :iram0_2_phdr
246
247
248  .Level3InterruptVector.text : ALIGN(4)
249  {
250    _Level3InterruptVector_text_start = ABSOLUTE(.);
251    KEEP (*(.Level3InterruptVector.text))
252    . = ALIGN (4);
253    _Level3InterruptVector_text_end = ABSOLUTE(.);
254    _memmap_seg_iram0_3_end = ALIGN(0x8);
255  } >iram0_3_seg :iram0_3_phdr
256
257
258  .DebugExceptionVector.text : ALIGN(4)
259  {
260    _DebugExceptionVector_text_start = ABSOLUTE(.);
261    KEEP (*(.DebugExceptionVector.text))
262    . = ALIGN (4);
263    _DebugExceptionVector_text_end = ABSOLUTE(.);
264    _memmap_seg_iram0_4_end = ALIGN(0x8);
265  } >iram0_4_seg :iram0_4_phdr
266
267
268  .NMIExceptionVector.text : ALIGN(4)
269  {
270    _NMIExceptionVector_text_start = ABSOLUTE(.);
271    KEEP (*(.NMIExceptionVector.text))
272    . = ALIGN (4);
273    _NMIExceptionVector_text_end = ABSOLUTE(.);
274    _memmap_seg_iram0_5_end = ALIGN(0x8);
275  } >iram0_5_seg :iram0_5_phdr
276
277
278  .KernelExceptionVector.text : ALIGN(4)
279  {
280    _KernelExceptionVector_text_start = ABSOLUTE(.);
281    KEEP (*(.KernelExceptionVector.text))
282    . = ALIGN (4);
283    _KernelExceptionVector_text_end = ABSOLUTE(.);
284    _memmap_seg_iram0_6_end = ALIGN(0x8);
285  } >iram0_6_seg :iram0_6_phdr
286
287
288  .UserExceptionVector.text : ALIGN(4)
289  {
290    _UserExceptionVector_text_start = ABSOLUTE(.);
291    KEEP (*(.UserExceptionVector.text))
292    . = ALIGN (4);
293    _UserExceptionVector_text_end = ABSOLUTE(.);
294    _memmap_seg_iram0_7_end = ALIGN(0x8);
295  } >iram0_7_seg :iram0_7_phdr
296
297
298  .DoubleExceptionVector.text : ALIGN(4)
299  {
300    _DoubleExceptionVector_text_start = ABSOLUTE(.);
301    KEEP (*(.DoubleExceptionVector.text))
302    . = ALIGN (4);
303    _DoubleExceptionVector_text_end = ABSOLUTE(.);
304  } >iram0_8_seg :iram0_8_phdr
305
306  .iram0.text : ALIGN(4)
307  {
308    _iram0_text_start = ABSOLUTE(.);
309    *(.iram0.text)
310    *(.iram.text)
311    . = ALIGN (4);
312    _iram0_text_end = ABSOLUTE(.);
313    _memmap_seg_iram0_8_end = ALIGN(0x8);
314  } >iram0_8_seg :iram0_8_phdr
315
316  _memmap_mem_iram0_max = ABSOLUTE(.);
317
318  .clib.rodata : ALIGN(4)
319  {
320    _clib_rodata_start = ABSOLUTE(.);
321    *(.clib.rodata)
322    . = ALIGN (4);
323    _clib_rodata_end = ABSOLUTE(.);
324  } >dsp_core_seg :dsp_core_phdr
325
326  .rtos.rodata : ALIGN(4)
327  {
328    _rtos_rodata_start = ABSOLUTE(.);
329    *(.rtos.rodata)
330    . = ALIGN (4);
331    _rtos_rodata_end = ABSOLUTE(.);
332  } >dsp_core_seg :dsp_core_phdr
333
334  .rodata : ALIGN(4)
335  {
336    _rodata_start = ABSOLUTE(.);
337    *(.rodata)
338    *(SORT(.rodata.sort.*))
339    KEEP (*(SORT(.rodata.keepsort.*) .rodata.keep.*))
340    *(.rodata.*)
341    *(.gnu.linkonce.r.*)
342    *(.rodata1)
343    __XT_EXCEPTION_TABLE__ = ABSOLUTE(.);
344    KEEP (*(.xt_except_table))
345    KEEP (*(.gcc_except_table))
346    *(.gnu.linkonce.e.*)
347    *(.gnu.version_r)
348    PROVIDE (__eh_frame_start = .);
349    KEEP (*(.eh_frame))
350    PROVIDE (__eh_frame_end = .);
351    /*  C++ constructor and destructor tables, properly ordered:  */
352    KEEP (*crtbegin.o(.ctors))
353    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
354    KEEP (*(SORT(.ctors.*)))
355    KEEP (*(.ctors))
356    KEEP (*crtbegin.o(.dtors))
357    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
358    KEEP (*(SORT(.dtors.*)))
359    KEEP (*(.dtors))
360    /*  C++ exception handlers table:  */
361    __XT_EXCEPTION_DESCS__ = ABSOLUTE(.);
362    *(.xt_except_desc)
363    *(.gnu.linkonce.h.*)
364    __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
365    *(.xt_except_desc_end)
366    *(.dynamic)
367    *(.gnu.version_d)
368    . = ALIGN(4);		/* this table MUST be 4-byte aligned */
369    _bss_table_start = ABSOLUTE(.);
370    LONG(_dram0_bss_start)
371    LONG(_dram0_bss_end)
372    LONG(_bss_start)
373    LONG(_bss_end)
374    _bss_table_end = ABSOLUTE(.);
375    . = ALIGN (4);
376    _rodata_end = ABSOLUTE(.);
377  } >dsp_core_seg :dsp_core_phdr
378
379  .text : ALIGN(4)
380  {
381    _stext = .;
382    _text_start = ABSOLUTE(.);
383    *(.entry.text)
384    *(.init.literal)
385    KEEP(*(.init))
386    *(.literal.sort.* SORT(.text.sort.*))
387    KEEP (*(.literal.keepsort.* SORT(.text.keepsort.*) .literal.keep.* .text.keep.* .literal.*personality* .text.*personality*))
388    *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
389    *(.fini.literal)
390    KEEP(*(.fini))
391    *(.gnu.version)
392    . = ALIGN (4);
393    _text_end = ABSOLUTE(.);
394    _etext = .;
395  } >dsp_core_seg :dsp_core_phdr
396
397  .clib.text : ALIGN(4)
398  {
399    _clib_text_start = ABSOLUTE(.);
400    *(.clib.literal .clib.text)
401    . = ALIGN (4);
402    _clib_text_end = ABSOLUTE(.);
403  } >dsp_core_seg :dsp_core_phdr
404
405  .rtos.text : ALIGN(4)
406  {
407    _rtos_text_start = ABSOLUTE(.);
408    *(.rtos.literal .rtos.text)
409    . = ALIGN (4);
410    _rtos_text_end = ABSOLUTE(.);
411  } >dsp_core_seg :dsp_core_phdr
412
413  .clib.data : ALIGN(4)
414  {
415    _clib_data_start = ABSOLUTE(.);
416    *(.clib.data)
417    . = ALIGN (4);
418    _clib_data_end = ABSOLUTE(.);
419  } >dsp_core_seg :dsp_core_phdr
420
421  .clib.percpu.data : ALIGN(4)
422  {
423    _clib_percpu_data_start = ABSOLUTE(.);
424    *(.clib.percpu.data)
425    . = ALIGN (4);
426    _clib_percpu_data_end = ABSOLUTE(.);
427  } >dsp_core_seg :dsp_core_phdr
428
429  .rtos.percpu.data : ALIGN(4)
430  {
431    _rtos_percpu_data_start = ABSOLUTE(.);
432    *(.rtos.percpu.data)
433    . = ALIGN (4);
434    _rtos_percpu_data_end = ABSOLUTE(.);
435  } >dsp_core_seg :dsp_core_phdr
436
437  .rtos.data : ALIGN(4)
438  {
439    _rtos_data_start = ABSOLUTE(.);
440    *(.rtos.data)
441    . = ALIGN (4);
442    _rtos_data_end = ABSOLUTE(.);
443  } >dsp_core_seg :dsp_core_phdr
444
445  .data : ALIGN(4)
446  {
447    _data_start = ABSOLUTE(.);
448    *(.data)
449    *(SORT(.data.sort.*))
450    KEEP (*(SORT(.data.keepsort.*) .data.keep.*))
451    *(.data.*)
452    *(.gnu.linkonce.d.*)
453    KEEP(*(.gnu.linkonce.d.*personality*))
454    *(.data1)
455    *(.sdata)
456    *(.sdata.*)
457    *(.gnu.linkonce.s.*)
458    *(.sdata2)
459    *(.sdata2.*)
460    *(.gnu.linkonce.s2.*)
461    KEEP(*(.jcr))
462    *(__llvm_prf_cnts)
463    *(__llvm_prf_data)
464    *(__llvm_prf_vnds)
465    . = ALIGN (4);
466    _data_end = ABSOLUTE(.);
467  } >dsp_core_seg :dsp_core_phdr
468
469  __llvm_prf_names : ALIGN(4)
470  {
471    __llvm_prf_names_start = ABSOLUTE(.);
472    *(__llvm_prf_names)
473    . = ALIGN (4);
474    __llvm_prf_names_end = ABSOLUTE(.);
475  } >dsp_core_seg :dsp_core_phdr
476
477  .note.gnu.build-id : ALIGN(4)
478  {
479    _note_gnu_build-id_start = ABSOLUTE(.);
480    *(.note.gnu.build-id)
481    . = ALIGN (4);
482    _note_gnu_build-id_end = ABSOLUTE(.);
483  } >dsp_core_seg :dsp_core_phdr
484
485  .bss (NOLOAD) : ALIGN(8)
486  {
487    . = ALIGN (8);
488    _bss_start = ABSOLUTE(.);
489    *(.dynsbss)
490    *(.sbss)
491    *(.sbss.*)
492    *(.gnu.linkonce.sb.*)
493    *(.scommon)
494    *(.sbss2)
495    *(.sbss2.*)
496    *(.gnu.linkonce.sb2.*)
497    *(.dynbss)
498    *(.bss)
499    *(SORT(.bss.sort.*))
500    KEEP (*(SORT(.bss.keepsort.*) .bss.keep.*))
501    *(.bss.*)
502    *(.gnu.linkonce.b.*)
503    *(COMMON)
504    *(.clib.bss)
505    *(.clib.percpu.bss)
506    *(.rtos.percpu.bss)
507    *(.rtos.bss)
508    . = ALIGN (8);
509    _bss_end = ABSOLUTE(.);
510    _end = ALIGN(0x8);
511    PROVIDE(end = ALIGN(0x8));
512    _stack_sentry = ALIGN(0x8);
513    _memmap_seg_dsp_core_end = ALIGN(0x8);
514  } >dsp_core_seg :dsp_core_bss_phdr
515
516  PROVIDE(__stack = 0x20580000);
517  _heap_sentry = 0x20580000;
518
519  _memmap_mem_dsp_core_max = ABSOLUTE(.);
520
521  .debug  0 :  { *(.debug) }
522  .line  0 :  { *(.line) }
523  .debug_srcinfo  0 :  { *(.debug_srcinfo) }
524  .debug_sfnames  0 :  { *(.debug_sfnames) }
525  .debug_aranges  0 :  { *(.debug_aranges) }
526  .debug_ranges   0 :  { *(.debug_ranges) }
527  .debug_pubnames  0 :  { *(.debug_pubnames) }
528  .debug_info  0 :  { *(.debug_info) }
529  .debug_abbrev  0 :  { *(.debug_abbrev) }
530  .debug_line  0 :  { *(.debug_line) }
531  .debug_frame  0 :  { *(.debug_frame) }
532  .debug_str  0 :  { *(.debug_str) }
533  .debug_loc  0 :  { *(.debug_loc) }
534  .debug_macinfo  0 :  { *(.debug_macinfo) }
535  .debug_weaknames  0 :  { *(.debug_weaknames) }
536  .debug_funcnames  0 :  { *(.debug_funcnames) }
537  .debug_typenames  0 :  { *(.debug_typenames) }
538  .debug_varnames  0 :  { *(.debug_varnames) }
539  .xt.insn 0 :
540  {
541    KEEP (*(.xt.insn))
542    KEEP (*(.gnu.linkonce.x.*))
543  }
544  .xt.prop 0 :
545  {
546    *(.xt.prop)
547    *(.xt.prop.*)
548    *(.gnu.linkonce.prop.*)
549  }
550  .xt.lit 0 :
551  {
552    *(.xt.lit)
553    *(.xt.lit.*)
554    *(.gnu.linkonce.p.*)
555  }
556  .xtensa.info 0 :
557  {
558    *(.xtensa.info)
559  }
560  .debug.xt.callgraph 0 :
561  {
562    KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*))
563  }
564  .comment 0 :
565  {
566    KEEP(*(.comment))
567  }
568  .note.GNU-stack 0 :
569  {
570    *(.note.GNU-stack)
571  }
572}
573
574