OSDN Git Service

Change the directry name to hirado
[trx-305dsp/dsp.git] / hirado / kernel / config / blackfin / _common_bf592 / bf592elf.ld
1
2 OUTPUT_FORMAT("elf32-bfin","elf32-bfin","elf32-bfin")
3 OUTPUT_ARCH(bfin)
4
5 PROVIDE (ldf_stack_end = 0xffb00FFC ) ;
6 PROVIDE (hardware_init_hook = 0) ;
7 PROVIDE (software_init_hook = 0) ;
8 PROVIDE (software_term_hook = 0) ;
9 PROVIDE (__kernel_boot_for_gdb = 0);
10 ENTRY (start);
11
12 MEMORY
13   {
14
15     MEM_L1_DATA_A (W!X)  : ORIGIN = 0xff800000, LENGTH = 32K
16     MEM_L1_CODE (XR)     : ORIGIN = 0xffa00000, LENGTH = 32K
17     MEM_L1_SCRATCH (W!X) : ORIGIN = 0xffb00000, LENGTH = 4K
18     
19   }
20
21 SECTIONS
22 {
23
24 /* Read-only sections, merged into text segment: */
25   .interp         : { *(.interp) }
26   .hash           : { *(.hash) }
27   .dynsym         : { *(.dynsym) }
28   .dynstr         : { *(.dynstr) }
29   .gnu.version    : { *(.gnu.version) }
30   .gnu.version_d  : { *(.gnu.version_d) }
31   .gnu.version_r  : { *(.gnu.version_r) }
32   .rel.init       : { *(.rel.init) }
33   .rela.init      : { *(.rela.init) }
34   .rel.text       : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
35   .rela.text      : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
36   .rel.fini       : { *(.rel.fini) }
37   .rela.fini      : { *(.rela.fini) }
38   .rel.rodata     : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
39   .rela.rodata    : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
40   .rel.data.rel.ro   : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
41   .rela.data.rel.ro   : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
42   .rel.data       : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
43   .rela.data      : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
44   .rel.tdata      : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
45   .rela.tdata     : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
46   .rel.tbss   : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
47   .rela.tbss      : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
48   .rel.ctors      : { *(.rel.ctors) }
49   .rela.ctors     : { *(.rela.ctors) }
50   .rel.dtors      : { *(.rel.dtors) }
51   .rela.dtors     : { *(.rela.dtors) }
52   .rel.got        : { *(.rel.got) }
53   .rela.got       : { *(.rela.got) }
54   .rel.sdata      : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
55   .rela.sdata     : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
56   .rel.sbss       : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
57   .rela.sbss      : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
58   .rel.sdata2     : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
59   .rela.sdata2    : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
60   .rel.sbss2      : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
61   .rela.sbss2     : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
62   .rel.bss        : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
63   .rela.bss       : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
64   .rel.plt        : { *(.rel.plt) }
65   .rela.plt       : { *(.rela.plt) }
66   .l2             :
67   {
68     *(.l2 .l2.*)
69   } >MEM_L1_DATA_A
70  
71   .start           :
72   {
73     KEEP (*(.start))
74   } >MEM_L1_CODE =0
75  
76   .text           :
77   {
78     *(.text .stub .text.* .gnu.linkonce.t.*)
79     KEEP (*(.text.*personality*))
80     /* .gnu.warning sections are handled specially by elf32.em.  */
81     *(.gnu.warning)
82   } >MEM_L1_CODE =0
83   
84   .init           :
85   {
86     KEEP (*(.init))
87   } >MEM_L1_CODE =0
88  
89   .plt            : { *(.plt) } >MEM_L1_CODE
90  
91   .fini           :
92   {
93     KEEP (*(.fini))
94   } >MEM_L1_CODE =0
95   
96   PROVIDE (__etext = .);
97   PROVIDE (_etext = .);
98   PROVIDE (etext = .);
99   
100   .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >MEM_L1_DATA_A
101   .rodata1        : { *(.rodata1) } >MEM_L1_DATA_A
102   
103   .sdata2         :
104   {
105     *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
106   } >MEM_L1_DATA_A
107   
108   .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } >MEM_L1_DATA_A
109   .eh_frame_hdr : { *(.eh_frame_hdr) } >MEM_L1_DATA_A
110   .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) } >MEM_L1_DATA_A
111   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } >MEM_L1_DATA_A
112   
113   /* Adjust the address for the data segment.  We want to adjust up to
114      the same address within the page on the next page up.  */
115   . = ALIGN(0x1000) + (. & (0x1000 - 1));
116   /* Exception handling  */
117   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) } >MEM_L1_DATA_A
118   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } >MEM_L1_DATA_A
119   /* Thread Local Storage sections  */
120   .tdata      : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >MEM_L1_DATA_A
121   .tbss       : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >MEM_L1_DATA_A
122   .preinit_array     :
123   {
124     PROVIDE_HIDDEN (___preinit_array_start = .);
125     KEEP (*(.preinit_array))
126     PROVIDE_HIDDEN (___preinit_array_end = .);
127   } >MEM_L1_DATA_A
128   .init_array     :
129   {
130      PROVIDE_HIDDEN (___init_array_start = .);
131      KEEP (*(SORT(.init_array.*)))
132      KEEP (*(.init_array))
133      PROVIDE_HIDDEN (___init_array_end = .);
134   } >MEM_L1_DATA_A
135   .fini_array     :
136   {
137     PROVIDE_HIDDEN (___fini_array_start = .);
138     KEEP (*(.fini_array))
139     KEEP (*(SORT(.fini_array.*)))
140     PROVIDE_HIDDEN (___fini_array_end = .);
141   } >MEM_L1_DATA_A
142
143   .ctors          :
144   {
145     /* gcc uses crtbegin.o to find the start of
146        the constructors, so we make sure it is
147        first.  Because this is a wildcard, it
148        doesn't matter if the user does not
149        actually link against crtbegin.o; the
150        linker won't look for a file to match a
151        wildcard.  The wildcard also means that it
152        doesn't matter which directory crtbegin.o
153        is in.  */
154     KEEP (*crtbegin*.o(.ctors))
155     /* We don't want to include the .ctor section from
156        the crtend.o file until after the sorted ctors.
157        The .ctor section from the crtend file contains the
158        end of ctors marker and it must be last */
159     KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
160     KEEP (*(SORT(.ctors.*)))
161     KEEP (*crtend*.o(.ctors))
162   } >MEM_L1_DATA_A
163   .dtors          :
164   {
165     KEEP (*crtbegin*.o(.dtors))
166     KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
167     KEEP (*(SORT(.dtors.*)))
168     KEEP (*crtend*.o(.dtors))
169   } >MEM_L1_DATA_A
170   .jcr            : { KEEP (*(.jcr)) } >MEM_L1_DATA_A
171   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) } >MEM_L1_DATA_A
172   .dynamic        : { *(.dynamic) } >MEM_L1_DATA_A
173   .data           :
174   {
175     *(.data .data.* .gnu.linkonce.d.*)
176     KEEP (*(.gnu.linkonce.d.*personality*))
177     SORT(CONSTRUCTORS)
178   } >MEM_L1_DATA_A
179   .data1          : { *(.data1) } >MEM_L1_DATA_A
180   .got            : { *(.got.plt) *(.got) } >MEM_L1_DATA_A
181   /* We want the small data sections together, so single-instruction offsets
182      can access them all, and initialized data all before uninitialized, so
183      we can shorten the on-disk segment size.  */
184   .sdata          :
185   {
186     *(.sdata .sdata.* .gnu.linkonce.s.*)
187   } >MEM_L1_DATA_A
188   __edata = .; PROVIDE (_edata = .);
189   .sbss           :
190   {
191     __bss_start = .;
192     *(.dynsbss)
193     *(.sbss .sbss.* .gnu.linkonce.sb.*)
194     *(.scommon)
195   } >MEM_L1_DATA_A
196   .bss            :
197   {
198     *(.dynbss)
199     *(.bss .bss.* .gnu.linkonce.b.*)
200     *(COMMON)
201     /* Align here to ensure that the .bss section occupies space up to
202        _end.  Align after .bss to ensure correct alignment even if the
203        .bss section disappears because there are no input sections.
204        FIXME: Why do we need it? When there is no .bss section, we don't
205        pad the .data section.  */
206     . = ALIGN(. != 0 ? 32 / 8 : 1);
207     __bss_end = .;
208   } >MEM_L1_DATA_A
209   . = ALIGN(32 / 8);
210   . = ALIGN(32 / 8);
211   __end = .; PROVIDE (_end = .);
212   
213   __heap_start = .;
214   __heap_end = ORIGIN(MEM_L1_DATA_A) + LENGTH(MEM_L1_DATA_A);
215   
216   
217   
218   /* Stabs debugging sections.  */
219   .stab          0 : { *(.stab) }
220   .stabstr       0 : { *(.stabstr) }
221   .stab.excl     0 : { *(.stab.excl) }
222   .stab.exclstr  0 : { *(.stab.exclstr) }
223   .stab.index    0 : { *(.stab.index) }
224   .stab.indexstr 0 : { *(.stab.indexstr) }
225   .comment       0 : { *(.comment) }
226   /* DWARF debug sections.
227      Symbols in the DWARF debugging sections are relative to the beginning
228      of the section so we begin them at 0.  */
229   /* DWARF 1 */
230   .debug          0 : { *(.debug) }
231   .line           0 : { *(.line) }
232   /* GNU DWARF 1 extensions */
233   .debug_srcinfo  0 : { *(.debug_srcinfo) }
234   .debug_sfnames  0 : { *(.debug_sfnames) }
235   /* DWARF 1.1 and DWARF 2 */
236   .debug_aranges  0 : { *(.debug_aranges) }
237   .debug_pubnames 0 : { *(.debug_pubnames) }
238   /* DWARF 2 */
239   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
240   .debug_abbrev   0 : { *(.debug_abbrev) }
241   .debug_line     0 : { *(.debug_line) }
242   .debug_frame    0 : { *(.debug_frame) }
243   .debug_str      0 : { *(.debug_str) }
244   .debug_loc      0 : { *(.debug_loc) }
245   .debug_macinfo  0 : { *(.debug_macinfo) }
246   /* SGI/MIPS DWARF 2 extensions */
247   .debug_weaknames 0 : { *(.debug_weaknames) }
248   .debug_funcnames 0 : { *(.debug_funcnames) }
249   .debug_typenames 0 : { *(.debug_typenames) }
250   .debug_varnames  0 : { *(.debug_varnames) }
251
252   __stack_end = ORIGIN(MEM_L1_SCRATCH) + LENGTH(MEM_L1_SCRATCH);
253
254
255
256     PROVIDE (end = .) ;
257     
258     
259     .comment        0 : { *(.comment) }
260     .debug          0 : { *(.debug) }
261     .line           0 : { *(.line) }
262     .debug_srcinfo  0 : { *(.debug_srcinfo) }
263     .debug_sfnames  0 : { *(.debug_sfnames) }
264     .debug_aranges  0 : { *(.debug_aranges) }
265     .debug_pubnames 0 : { *(.debug_pubnames) }
266 }