1 | OUTPUT_FORMAT("elf32-bfin", "elf32-bfin", |
---|
2 | "elf32-bfin") |
---|
3 | |
---|
4 | OUTPUT_ARCH(bfin) |
---|
5 | ENTRY(__start) |
---|
6 | STARTUP(start.o) |
---|
7 | |
---|
8 | /* |
---|
9 | * Declare some sizes. |
---|
10 | */ |
---|
11 | _RamBase = DEFINED(_RamBase) ? _RamBase : 0x0; |
---|
12 | /* bf537stamp has 64MB ram, but dynamic mmu tables have not yet been |
---|
13 | implemented. there are not enough static entries to support 64MB |
---|
14 | along with banks for io and flash, so waste some RAM at the end |
---|
15 | to free up mmu entries. */ |
---|
16 | _RamSize = DEFINED(_RamSize) ? _RamSize : 0x03400000; |
---|
17 | _RamEnd = _RamBase + _RamSize; |
---|
18 | _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0; |
---|
19 | |
---|
20 | MEMORY |
---|
21 | { |
---|
22 | sdram(rwx) : ORIGIN = 0x00001000, LENGTH = 0x03fff000 |
---|
23 | /* |
---|
24 | l1code(rwx) : ORIGIN = 0xffa08000, LENGTH = 0x00008000 |
---|
25 | l1data(rwx) : ORIGIN = 0xff804000, LENGTH = 0x00004000 |
---|
26 | */ |
---|
27 | } |
---|
28 | |
---|
29 | SECTIONS |
---|
30 | { |
---|
31 | |
---|
32 | /* |
---|
33 | .l1code : |
---|
34 | { |
---|
35 | */ |
---|
36 | /*jump.o (.text)*/ |
---|
37 | /* |
---|
38 | } > l1code |
---|
39 | */ |
---|
40 | |
---|
41 | .init : |
---|
42 | { |
---|
43 | *(.start) |
---|
44 | KEEP (*(.init)) |
---|
45 | } > sdram /*=0*/ |
---|
46 | |
---|
47 | .text : |
---|
48 | { |
---|
49 | CREATE_OBJECT_SYMBOLS |
---|
50 | *(.text) |
---|
51 | *(.rodata*) |
---|
52 | *(.gnu.linkonce.r*) |
---|
53 | |
---|
54 | /* |
---|
55 | * Special FreeBSD sysctl sections. |
---|
56 | */ |
---|
57 | . = ALIGN (16); |
---|
58 | ___start_set_sysctl_set = .; |
---|
59 | *(set_sysctl_*); |
---|
60 | ___stop_set_sysctl_set = ABSOLUTE(.); |
---|
61 | *(set_domain_*); |
---|
62 | *(set_pseudo_*); |
---|
63 | |
---|
64 | _etext = .; |
---|
65 | |
---|
66 | ___CTOR_LIST__ = .; |
---|
67 | LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2) |
---|
68 | *(.ctors) |
---|
69 | LONG(0) |
---|
70 | ___CTOR_END__ = .; |
---|
71 | ___DTOR_LIST__ = .; |
---|
72 | LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2) |
---|
73 | *(.dtors) |
---|
74 | LONG(0) |
---|
75 | ___DTOR_END__ = .; |
---|
76 | } > sdram |
---|
77 | |
---|
78 | .tdata : { |
---|
79 | __TLS_Data_begin = .; |
---|
80 | *(.tdata .tdata.* .gnu.linkonce.td.*) |
---|
81 | __TLS_Data_end = .; |
---|
82 | } > sdram |
---|
83 | |
---|
84 | .tbss : { |
---|
85 | __TLS_BSS_begin = .; |
---|
86 | *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) |
---|
87 | __TLS_BSS_end = .; |
---|
88 | } > sdram |
---|
89 | |
---|
90 | __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin; |
---|
91 | __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin; |
---|
92 | __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin; |
---|
93 | __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin; |
---|
94 | __TLS_Size = __TLS_BSS_end - __TLS_Data_begin; |
---|
95 | __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss)); |
---|
96 | |
---|
97 | .fini : |
---|
98 | { |
---|
99 | KEEP (*(.fini)) |
---|
100 | } > sdram /*=0*/ |
---|
101 | |
---|
102 | .data : |
---|
103 | { |
---|
104 | *(.data) |
---|
105 | KEEP (*(SORT(.rtemsrwset.*))) |
---|
106 | *(.jcr) |
---|
107 | *(.gnu.linkonce.d*) |
---|
108 | CONSTRUCTORS |
---|
109 | _edata = .; |
---|
110 | } > sdram |
---|
111 | |
---|
112 | .eh_frame : { *(.eh_frame) } > sdram |
---|
113 | .data1 : { *(.data1) } > sdram |
---|
114 | .eh_frame : { *(.eh_frame) } > sdram |
---|
115 | .gcc_except_table : { *(.gcc_except_table*) } > sdram |
---|
116 | |
---|
117 | .rodata : |
---|
118 | { |
---|
119 | *(.rodata) |
---|
120 | *(.rodata.*) |
---|
121 | KEEP (*(SORT(.rtemsroset.*))) |
---|
122 | *(.gnu.linkonce.r*) |
---|
123 | } > sdram |
---|
124 | |
---|
125 | |
---|
126 | .bss : |
---|
127 | { |
---|
128 | _bss_start = .; |
---|
129 | _clear_start = .; |
---|
130 | *(.bss) |
---|
131 | *(.gnu.linkonce.b.*) |
---|
132 | *(COMMON) |
---|
133 | . = ALIGN (64); |
---|
134 | _clear_end = .; |
---|
135 | _end = .; |
---|
136 | __end = .; |
---|
137 | } > sdram |
---|
138 | |
---|
139 | .noinit (NOLOAD) : { |
---|
140 | *(.noinit*) |
---|
141 | } > sdram |
---|
142 | |
---|
143 | .rtemsstack (NOLOAD) : { |
---|
144 | *(SORT(.rtemsstack.*)) |
---|
145 | _WorkAreaBase = .; |
---|
146 | } > sdram |
---|
147 | |
---|
148 | /* Debugging stuff follows */ |
---|
149 | |
---|
150 | /* Stabs debugging sections. */ |
---|
151 | .stab 0 : { *(.stab) } |
---|
152 | .stabstr 0 : { *(.stabstr) } |
---|
153 | .stab.excl 0 : { *(.stab.excl) } |
---|
154 | .stab.exclstr 0 : { *(.stab.exclstr) } |
---|
155 | .stab.index 0 : { *(.stab.index) } |
---|
156 | .stab.indexstr 0 : { *(.stab.indexstr) } |
---|
157 | .comment 0 : { *(.comment) } |
---|
158 | /* DWARF debug sections. |
---|
159 | Symbols in the DWARF debugging sections are relative to the beginning |
---|
160 | of the section so we begin them at 0. */ |
---|
161 | /* DWARF 1 */ |
---|
162 | .debug 0 : { *(.debug) } |
---|
163 | .line 0 : { *(.line) } |
---|
164 | /* GNU DWARF 1 extensions */ |
---|
165 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
166 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
167 | /* DWARF 1.1 and DWARF 2 */ |
---|
168 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
169 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
170 | /* DWARF 2 */ |
---|
171 | .debug_info 0 : { *(.debug_info) } |
---|
172 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
173 | .debug_line 0 : { *(.debug_line) } |
---|
174 | .debug_frame 0 : { *(.debug_frame) } |
---|
175 | .debug_str 0 : { *(.debug_str) } |
---|
176 | .debug_loc 0 : { *(.debug_loc) } |
---|
177 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
178 | /* SGI/MIPS DWARF 2 extensions */ |
---|
179 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
180 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
181 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
182 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
183 | /* These must appear regardless of . */ |
---|
184 | } |
---|
185 | |
---|
186 | __RamBase = _RamBase; |
---|
187 | __RamSize = _RamSize; |
---|
188 | __edata = _edata; |
---|
189 | __etext = _etext; |
---|