[783669fc] | 1 | /* generated.x |
---|
| 2 | * |
---|
| 3 | * Machine generated for a CPU named "cpu_0" as defined in: |
---|
| 4 | * D:\eb2_nios2\kawkos.ptf |
---|
| 5 | * |
---|
| 6 | * Generated: 2005-07-10 11:52:46.899 |
---|
| 7 | * |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | /* |
---|
| 11 | |
---|
| 12 | DO NOT MODIFY THIS FILE |
---|
| 13 | |
---|
| 14 | Changing this file will have subtle consequences |
---|
| 15 | which will almost certainly lead to a nonfunctioning |
---|
| 16 | system. If you do modify this file, be aware that your |
---|
| 17 | changes will be overwritten and lost when this file |
---|
| 18 | is generated again. |
---|
| 19 | |
---|
| 20 | DO NOT MODIFY THIS FILE |
---|
| 21 | |
---|
| 22 | */ |
---|
| 23 | |
---|
[2d41fc5] | 24 | RamBase = DEFINED(RamBase) ? RamBase : 0x00000000; |
---|
| 25 | RamSize = DEFINED(RamSize) ? RamSize : 0x00800000; |
---|
| 26 | HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0; |
---|
[69722ac9] | 27 | StackSize = DEFINED(StackSize) ? HeapSize : 1024; |
---|
[2d41fc5] | 28 | |
---|
[783669fc] | 29 | MEMORY |
---|
| 30 | { |
---|
| 31 | reset : ORIGIN = 0x00000000, LENGTH = 0x00000600 |
---|
| 32 | exceptions : ORIGIN = 0x00000600, LENGTH = 0x00000A00 |
---|
| 33 | onchip_memory_0 : ORIGIN = 0x00001000, LENGTH = 0x007FF000 |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | /* Define symbols for each memory base-address */ |
---|
| 37 | __alt_mem_onchip_memory_0 = 0x00000000 ; |
---|
| 38 | |
---|
| 39 | __nios2_icache_size = 4096 ; |
---|
| 40 | __nios2_icache_line_size = 32 ; |
---|
| 41 | __nios2_dcache_size = 0 ; |
---|
| 42 | __nios2_dcache_line_size = 4 ; |
---|
| 43 | |
---|
| 44 | OUTPUT_FORMAT( "elf32-littlenios2", |
---|
| 45 | "elf32-littlenios2", |
---|
| 46 | "elf32-littlenios2" ) |
---|
| 47 | OUTPUT_ARCH( nios2 ) |
---|
[5ca6d259] | 48 | ENTRY(start) |
---|
| 49 | STARTUP(start.o) |
---|
[783669fc] | 50 | |
---|
| 51 | /* Do we need any of these for elf? |
---|
| 52 | __DYNAMIC = 0; |
---|
| 53 | */ |
---|
| 54 | |
---|
| 55 | SECTIONS |
---|
| 56 | { |
---|
| 57 | .entry : |
---|
| 58 | { |
---|
| 59 | KEEP (*(.entry)) |
---|
| 60 | } > reset |
---|
| 61 | |
---|
| 62 | .exceptions : |
---|
| 63 | { |
---|
| 64 | PROVIDE (__ram_exceptions_start = ABSOLUTE(.)); |
---|
| 65 | . = ALIGN(0x20); |
---|
| 66 | *(.irq) |
---|
| 67 | KEEP (*(.exceptions.entry.label)); |
---|
| 68 | KEEP (*(.exceptions.entry.user)); |
---|
| 69 | KEEP (*(.exceptions.entry)); |
---|
| 70 | KEEP (*(.exceptions.irqtest.user)); |
---|
| 71 | KEEP (*(.exceptions.irqtest)); |
---|
| 72 | KEEP (*(.exceptions.irqhandler.user)); |
---|
| 73 | KEEP (*(.exceptions.irqhandler)); |
---|
| 74 | KEEP (*(.exceptions.irqreturn.user)); |
---|
| 75 | KEEP (*(.exceptions.irqreturn)); |
---|
| 76 | KEEP (*(.exceptions.notirq.label)); |
---|
| 77 | KEEP (*(.exceptions.notirq.user)); |
---|
| 78 | KEEP (*(.exceptions.notirq)); |
---|
| 79 | KEEP (*(.exceptions.soft.user)); |
---|
| 80 | KEEP (*(.exceptions.soft)); |
---|
| 81 | KEEP (*(.exceptions.unknown.user)); |
---|
| 82 | KEEP (*(.exceptions.unknown)); |
---|
| 83 | KEEP (*(.exceptions.exit.label)); |
---|
| 84 | KEEP (*(.exceptions.exit.user)); |
---|
| 85 | KEEP (*(.exceptions.exit)); |
---|
| 86 | KEEP (*(.exceptions)); |
---|
| 87 | PROVIDE (__ram_exceptions_end = ABSOLUTE(.)); |
---|
| 88 | } > exceptions |
---|
| 89 | |
---|
| 90 | PROVIDE (__flash_exceptions_start = LOADADDR(.exceptions)); |
---|
| 91 | |
---|
| 92 | .text : |
---|
| 93 | { |
---|
| 94 | /* |
---|
| 95 | * All code sections are merged into the text output section, along with |
---|
| 96 | * the read only data sections. |
---|
| 97 | * |
---|
| 98 | */ |
---|
| 99 | |
---|
| 100 | PROVIDE (stext = ABSOLUTE(.)); |
---|
| 101 | |
---|
| 102 | *(.interp) |
---|
| 103 | *(.hash) |
---|
| 104 | *(.dynsym) |
---|
| 105 | *(.dynstr) |
---|
| 106 | *(.gnu.version) |
---|
| 107 | *(.gnu.version_d) |
---|
| 108 | *(.gnu.version_r) |
---|
| 109 | *(.rel.init) |
---|
| 110 | *(.rela.init) |
---|
| 111 | *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) |
---|
| 112 | *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) |
---|
| 113 | *(.rel.fini) |
---|
| 114 | *(.rela.fini) |
---|
| 115 | *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) |
---|
| 116 | *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) |
---|
| 117 | *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) |
---|
| 118 | *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) |
---|
| 119 | *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) |
---|
| 120 | *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) |
---|
| 121 | *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) |
---|
| 122 | *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) |
---|
| 123 | *(.rel.ctors) |
---|
| 124 | *(.rela.ctors) |
---|
| 125 | *(.rel.dtors) |
---|
| 126 | *(.rela.dtors) |
---|
| 127 | *(.rel.got) |
---|
| 128 | *(.rela.got) |
---|
| 129 | *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) |
---|
| 130 | *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) |
---|
| 131 | *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) |
---|
| 132 | *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) |
---|
| 133 | *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) |
---|
| 134 | *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) |
---|
| 135 | *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) |
---|
| 136 | *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) |
---|
| 137 | *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) |
---|
| 138 | *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) |
---|
| 139 | *(.rel.plt) |
---|
| 140 | *(.rela.plt) |
---|
| 141 | |
---|
| 142 | KEEP (*(.init)) |
---|
| 143 | *(.plt) |
---|
| 144 | *(.text .stub .text.* .gnu.linkonce.t.*) |
---|
| 145 | |
---|
| 146 | /* Special FreeBSD sysctl sections. */ |
---|
| 147 | . = ALIGN (16); |
---|
| 148 | __start_set_sysctl_set = .; |
---|
| 149 | *(set_sysctl_*); |
---|
| 150 | __stop_set_sysctl_set = ABSOLUTE(.); |
---|
| 151 | *(set_domain_*); |
---|
| 152 | *(set_pseudo_*); |
---|
| 153 | |
---|
| 154 | /* .gnu.warning sections are handled specially by elf32.em. */ |
---|
| 155 | |
---|
| 156 | *(.gnu.warning.*) |
---|
| 157 | KEEP (*(.fini)) |
---|
| 158 | PROVIDE (__etext = ABSOLUTE(.)); |
---|
| 159 | PROVIDE (_etext = ABSOLUTE(.)); |
---|
| 160 | PROVIDE (etext = ABSOLUTE(.)); |
---|
| 161 | |
---|
| 162 | *(.eh_frame_hdr) |
---|
| 163 | /* Ensure the __preinit_array_start label is properly aligned. We |
---|
| 164 | could instead move the label definition inside the section, but |
---|
| 165 | the linker would then create the section even if it turns out to |
---|
| 166 | be empty, which isn't pretty. */ |
---|
| 167 | . = ALIGN(32 / 8); |
---|
| 168 | PROVIDE (__preinit_array_start = ABSOLUTE(.)); |
---|
| 169 | *(.preinit_array) |
---|
| 170 | PROVIDE (__preinit_array_end = ABSOLUTE(.)); |
---|
| 171 | PROVIDE (__init_array_start = ABSOLUTE(.)); |
---|
| 172 | *(.init_array) |
---|
| 173 | PROVIDE (__init_array_end = ABSOLUTE(.)); |
---|
| 174 | PROVIDE (__fini_array_start = ABSOLUTE(.)); |
---|
| 175 | *(.fini_array) |
---|
| 176 | PROVIDE (__fini_array_end = ABSOLUTE(.)); |
---|
| 177 | SORT(CONSTRUCTORS) |
---|
| 178 | KEEP (*(.eh_frame)) |
---|
[d1f57b5] | 179 | *(.gcc_except_table*) |
---|
[783669fc] | 180 | *(.dynamic) |
---|
| 181 | PROVIDE (__CTOR_LIST__ = ABSOLUTE(.)); |
---|
| 182 | KEEP (*(.ctors)) |
---|
| 183 | KEEP (*(SORT(.ctors.*))) |
---|
| 184 | PROVIDE (__CTOR_END__ = ABSOLUTE(.)); |
---|
| 185 | PROVIDE (__DTOR_LIST__ = ABSOLUTE(.)); |
---|
| 186 | KEEP (*(.dtors)) |
---|
| 187 | KEEP (*(SORT(.dtors.*))) |
---|
| 188 | PROVIDE (__DTOR_END__ = ABSOLUTE(.)); |
---|
| 189 | KEEP (*(.jcr)) |
---|
| 190 | . = ALIGN(32 / 8); |
---|
| 191 | } > onchip_memory_0 = 0x3a880100 /* NOP on Nios2 (big endian) */ |
---|
| 192 | |
---|
| 193 | .rodata : |
---|
| 194 | { |
---|
| 195 | PROVIDE (__ram_rodata_start = ABSOLUTE(.)); |
---|
| 196 | . = ALIGN(32 / 8); |
---|
[44d18b9] | 197 | *(.rodata .rodata.* .gnu.linkonce.r.*) |
---|
[783669fc] | 198 | *(.rodata1) |
---|
[44d18b9] | 199 | KEEP (*(SORT(.rtemsroset.*))) |
---|
[960fd85] | 200 | } > onchip_memory_0 |
---|
| 201 | |
---|
| 202 | .tdata : { |
---|
| 203 | _TLS_Data_begin = .; |
---|
| 204 | *(.tdata .tdata.* .gnu.linkonce.td.*) |
---|
| 205 | _TLS_Data_end = .; |
---|
| 206 | } > onchip_memory_0 |
---|
| 207 | |
---|
| 208 | .tbss : { |
---|
| 209 | _TLS_BSS_begin = .; |
---|
| 210 | *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) |
---|
| 211 | _TLS_BSS_end = .; |
---|
[783669fc] | 212 | . = ALIGN(32 / 8); |
---|
| 213 | PROVIDE (__ram_rodata_end = ABSOLUTE(.)); |
---|
| 214 | } > onchip_memory_0 |
---|
| 215 | |
---|
[960fd85] | 216 | _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin; |
---|
[d60e760] | 217 | _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin; |
---|
| 218 | _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin; |
---|
[960fd85] | 219 | _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin; |
---|
| 220 | _TLS_Size = _TLS_BSS_end - _TLS_Data_begin; |
---|
[d60e760] | 221 | _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss)); |
---|
[960fd85] | 222 | |
---|
[783669fc] | 223 | PROVIDE (__flash_rodata_start = LOADADDR(.rodata)); |
---|
| 224 | |
---|
| 225 | .rwdata : |
---|
| 226 | { |
---|
| 227 | PROVIDE (__ram_rwdata_start = ABSOLUTE(.)); |
---|
| 228 | . = ALIGN(32 / 8); |
---|
| 229 | *(.got.plt) *(.got) |
---|
| 230 | *(.data1) |
---|
| 231 | *(.data .data.* .gnu.linkonce.d.*) |
---|
[b618d8c] | 232 | KEEP (*(SORT(.rtemsrwset.*))) |
---|
[783669fc] | 233 | |
---|
| 234 | _gp = ABSOLUTE(. + 0x8000); |
---|
| 235 | PROVIDE(gp = _gp); |
---|
| 236 | |
---|
| 237 | *(.sdata .sdata.* .gnu.linkonce.s.*) |
---|
| 238 | *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) |
---|
| 239 | |
---|
| 240 | . = ALIGN(32 / 8); |
---|
| 241 | _edata = ABSOLUTE(.); |
---|
| 242 | PROVIDE (edata = ABSOLUTE(.)); |
---|
| 243 | PROVIDE (__ram_rwdata_end = ABSOLUTE(.)); |
---|
| 244 | } > onchip_memory_0 |
---|
| 245 | |
---|
| 246 | PROVIDE (__flash_rwdata_start = LOADADDR(.rwdata)); |
---|
| 247 | |
---|
| 248 | .bss : |
---|
| 249 | { |
---|
| 250 | __bss_start = ABSOLUTE(.); |
---|
| 251 | PROVIDE (__sbss_start = ABSOLUTE(.)); |
---|
| 252 | PROVIDE (___sbss_start = ABSOLUTE(.)); |
---|
| 253 | |
---|
| 254 | *(.dynsbss) |
---|
| 255 | *(.sbss .sbss.* .gnu.linkonce.sb.*) |
---|
| 256 | *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) |
---|
| 257 | *(.scommon) |
---|
| 258 | |
---|
| 259 | PROVIDE (__sbss_end = ABSOLUTE(.)); |
---|
| 260 | PROVIDE (___sbss_end = ABSOLUTE(.)); |
---|
| 261 | |
---|
| 262 | *(.dynbss) |
---|
| 263 | *(.bss .bss.* .gnu.linkonce.b.*) |
---|
| 264 | *(COMMON) |
---|
| 265 | |
---|
| 266 | . = ALIGN(32 / 8); |
---|
| 267 | __bss_end = ABSOLUTE(.); |
---|
[69722ac9] | 268 | _stack_low = ABSOLUTE(.); |
---|
| 269 | . += StackSize; |
---|
| 270 | _stack_high = ABSOLUTE(.); |
---|
[d785ce4a] | 271 | WorkAreaBase = .; |
---|
[783669fc] | 272 | } > onchip_memory_0 |
---|
| 273 | |
---|
| 274 | /* |
---|
| 275 | * One output section for each of the available partitions. These are not |
---|
| 276 | * used by default, but can be used by users applications using the .section |
---|
| 277 | * directive. |
---|
| 278 | * |
---|
| 279 | * The memory partition used for the heap is treated in special way, i.e. a |
---|
| 280 | * symbol is added to point to the heap start. |
---|
| 281 | * |
---|
| 282 | * Note that when running from flash, these sections are not loaded by the |
---|
| 283 | * HAL. |
---|
| 284 | * |
---|
| 285 | */ |
---|
| 286 | |
---|
| 287 | .onchip_memory_0 : |
---|
| 288 | { |
---|
| 289 | PROVIDE (_alt_partition_onchip_memory_0_start = ABSOLUTE(.)); |
---|
| 290 | *(.onchip_memory_0 .onchip_memory_0.*) |
---|
| 291 | . = ALIGN(32 / 8); |
---|
| 292 | PROVIDE (_alt_partition_onchip_memory_0_end = ABSOLUTE(.)); |
---|
| 293 | _end = ABSOLUTE(.); |
---|
| 294 | end = ABSOLUTE(.); |
---|
| 295 | |
---|
| 296 | } > onchip_memory_0 |
---|
| 297 | |
---|
| 298 | PROVIDE (_alt_partition_onchip_memory_0_load_addr = LOADADDR(.onchip_memory_0)); |
---|
| 299 | |
---|
| 300 | /* |
---|
| 301 | * Stabs debugging sections. |
---|
| 302 | * |
---|
| 303 | */ |
---|
| 304 | |
---|
| 305 | .stab 0 : { *(.stab) } |
---|
| 306 | .stabstr 0 : { *(.stabstr) } |
---|
| 307 | .stab.excl 0 : { *(.stab.excl) } |
---|
| 308 | .stab.exclstr 0 : { *(.stab.exclstr) } |
---|
| 309 | .stab.index 0 : { *(.stab.index) } |
---|
| 310 | .stab.indexstr 0 : { *(.stab.indexstr) } |
---|
| 311 | .comment 0 : { *(.comment) } |
---|
| 312 | /* DWARF debug sections. |
---|
| 313 | Symbols in the DWARF debugging sections are relative to the beginning |
---|
| 314 | of the section so we begin them at 0. */ |
---|
| 315 | /* DWARF 1 */ |
---|
| 316 | .debug 0 : { *(.debug) } |
---|
| 317 | .line 0 : { *(.line) } |
---|
| 318 | /* GNU DWARF 1 extensions */ |
---|
| 319 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
| 320 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
| 321 | /* DWARF 1.1 and DWARF 2 */ |
---|
| 322 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
| 323 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
| 324 | /* DWARF 2 */ |
---|
| 325 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } |
---|
| 326 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
| 327 | .debug_line 0 : { *(.debug_line) } |
---|
| 328 | .debug_frame 0 : { *(.debug_frame) } |
---|
| 329 | .debug_str 0 : { *(.debug_str) } |
---|
| 330 | .debug_loc 0 : { *(.debug_loc) } |
---|
| 331 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
| 332 | /* SGI/MIPS DWARF 2 extensions */ |
---|
| 333 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
| 334 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
| 335 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
| 336 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
| 337 | |
---|
| 338 | /* Altera debug extensions */ |
---|
| 339 | .debug_alt_sim_info 0 : { *(.debug_alt_sim_info) } |
---|
| 340 | } |
---|
| 341 | /* provide a pointer for the stack */ |
---|
| 342 | |
---|
| 343 | /* |
---|
| 344 | * Don't override this, override the __alt_stack_* symbols instead. |
---|
| 345 | */ |
---|
| 346 | __alt_data_end = 0x00800000; |
---|
| 347 | |
---|
| 348 | /* |
---|
| 349 | * The next two symbols define the location of the default stack. You can |
---|
| 350 | * override them to move the stack to a different memory. |
---|
| 351 | */ |
---|
[69722ac9] | 352 | PROVIDE( __alt_stack_pointer = _stack_high ); |
---|
| 353 | PROVIDE( __alt_stack_limit = _stack_low ); |
---|
[783669fc] | 354 | |
---|
| 355 | /* |
---|
| 356 | * This symbol controls where the start of the heap is. If the stack is |
---|
| 357 | * contiguous with the heap then the stack will contract as memory is |
---|
| 358 | * allocated to the heap. |
---|
| 359 | * Override this symbol to put the heap in a different memory. |
---|
| 360 | */ |
---|
| 361 | PROVIDE( __alt_heap_start = end ); |
---|
| 362 | |
---|