[e56c3546] | 1 | /* |
---|
| 2 | * This file contains GNU linker directives for an MCF5206eLITE |
---|
| 3 | * evaluation board. |
---|
| 4 | * |
---|
| 5 | * Variations in memory size and allocation can be made by |
---|
| 6 | * overriding some values with linker command-line arguments. |
---|
| 7 | * |
---|
| 8 | * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia |
---|
| 9 | * Author: Victor V. Vengerov <vvv@oktet.ru> |
---|
| 10 | * |
---|
| 11 | * This file based on work: |
---|
| 12 | * David Fiddes, D.J.Fiddes@hw.ac.uk |
---|
| 13 | * http://www.calm.hw.ac.uk/davidf/coldfire/ |
---|
| 14 | * |
---|
| 15 | * The license and distribution terms for this file may be |
---|
| 16 | * found in the file LICENSE in this distribution or at |
---|
| 17 | * |
---|
[acaae90] | 18 | * http://www.rtems.com/license/LICENSE. |
---|
[e56c3546] | 19 | * |
---|
| 20 | * $Id$ |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | /* |
---|
| 24 | * Declare some sizes. |
---|
| 25 | * XXX: The assignment of ". += XyzSize;" fails in older gld's if the |
---|
| 26 | * number used there is not constant. If this happens to you, edit |
---|
| 27 | * the lines marked XXX below to use a constant value. |
---|
| 28 | */ |
---|
[7b18d2f] | 29 | |
---|
| 30 | /* |
---|
| 31 | * Declare system clock frequency. |
---|
| 32 | */ |
---|
| 33 | _SYS_CLOCK_FREQUENCY = DEFINED(_SYS_CLOCK_FREQUENCY) ? |
---|
| 34 | _SYS_CLOCK_FREQUENCY : 54000000; |
---|
| 35 | |
---|
[e56c3546] | 36 | /* |
---|
| 37 | * Declare size of heap. |
---|
| 38 | * A heap size of 0 means "Use all available memory for the heap". |
---|
| 39 | * Initial stack located in on-chip SRAM and not declared there. |
---|
| 40 | */ |
---|
| 41 | _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0; |
---|
[7b18d2f] | 42 | _RamBase = DEFINED(_RamBase) ? _RamBase : 0x30000000; |
---|
| 43 | _RamSize = DEFINED(_RamSize) ? _RamSize : 0x00100000; |
---|
[e56c3546] | 44 | |
---|
| 45 | /* |
---|
| 46 | * Setup the memory map of the MCF5206eLITE evaluation board |
---|
| 47 | * |
---|
| 48 | * The "rom" section is in USER Flash on the board |
---|
| 49 | * The "ram" section is placed in USER RAM starting at 10000h |
---|
| 50 | * |
---|
| 51 | */ |
---|
| 52 | MEMORY |
---|
| 53 | { |
---|
| 54 | ram : ORIGIN = 0x30000000, LENGTH = 0x00100000 |
---|
| 55 | rom : ORIGIN = 0xFFE20000, LENGTH = 128k |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | MBase = 0x10000000; |
---|
| 59 | |
---|
| 60 | /* Interrupt Vector table located at start of external static RAM */ |
---|
| 61 | _VBR = 0x30000000; |
---|
| 62 | |
---|
| 63 | SECTIONS |
---|
| 64 | { |
---|
| 65 | |
---|
| 66 | /* |
---|
| 67 | * Dynamic RAM |
---|
| 68 | */ |
---|
| 69 | ram : { |
---|
| 70 | _RamBase = .; |
---|
| 71 | __RamBase = .; |
---|
| 72 | /* Reserve space for interrupt table */ |
---|
| 73 | . += 0x400; |
---|
| 74 | } >ram |
---|
| 75 | |
---|
| 76 | /* |
---|
| 77 | * Text, data and bss segments |
---|
| 78 | */ |
---|
| 79 | .text : { |
---|
[9c1133e] | 80 | CREATE_OBJECT_SYMBOLS |
---|
[f54f308] | 81 | *(.text*) |
---|
[e56c3546] | 82 | |
---|
| 83 | /* |
---|
| 84 | * C++ constructors/destructors |
---|
| 85 | */ |
---|
| 86 | *(.gnu.linkonce.t.*) |
---|
| 87 | |
---|
| 88 | /* |
---|
| 89 | * Initialization and finalization code. |
---|
| 90 | */ |
---|
[9c1133e] | 91 | . = ALIGN (16); |
---|
[e56c3546] | 92 | PROVIDE (_init = .); |
---|
| 93 | *crti.o(.init) |
---|
| 94 | *(.init) |
---|
| 95 | *crtn.o(.init) |
---|
[9c1133e] | 96 | . = ALIGN (16); |
---|
[e56c3546] | 97 | PROVIDE (_fini = .); |
---|
| 98 | *crti.o(.fini) |
---|
| 99 | *(.fini) |
---|
| 100 | *crtn.o(.fini) |
---|
| 101 | |
---|
[9c1133e] | 102 | /* |
---|
| 103 | * Special FreeBSD sysctl sections. |
---|
| 104 | */ |
---|
| 105 | . = ALIGN (16); |
---|
| 106 | __start_set_sysctl_set = .; |
---|
| 107 | *(set_sysctl_*); |
---|
| 108 | __stop_set_sysctl_set = ABSOLUTE(.); |
---|
| 109 | *(set_domain_*); |
---|
| 110 | *(set_pseudo_*); |
---|
| 111 | |
---|
[e56c3546] | 112 | /* |
---|
| 113 | * C++ constructors/destructors |
---|
| 114 | */ |
---|
| 115 | . = ALIGN (16); |
---|
| 116 | *crtbegin.o(.ctors) |
---|
| 117 | *(.ctors) |
---|
| 118 | *crtend.o(.ctors) |
---|
| 119 | *crtbegin.o(.dtors) |
---|
| 120 | *(.dtors) |
---|
| 121 | *crtend.o(.dtors) |
---|
| 122 | |
---|
| 123 | /* |
---|
| 124 | * Exception frame info |
---|
| 125 | */ |
---|
| 126 | . = ALIGN (16); |
---|
| 127 | *(.eh_frame) |
---|
| 128 | |
---|
| 129 | /* |
---|
| 130 | * Read-only data |
---|
| 131 | */ |
---|
| 132 | . = ALIGN (16); |
---|
[85c92574] | 133 | _rodata_start = .; |
---|
| 134 | *(.rodata*) |
---|
[e56c3546] | 135 | *(.gnu.linkonce.r*) |
---|
| 136 | |
---|
[9c1133e] | 137 | . = ALIGN (16); |
---|
[e56c3546] | 138 | PROVIDE (etext = .); |
---|
| 139 | |
---|
| 140 | } > ram |
---|
| 141 | |
---|
| 142 | .data BLOCK (0x4) : { |
---|
| 143 | copy_start = .; |
---|
| 144 | *(.shdata) |
---|
| 145 | . = ALIGN (0x10); |
---|
[1144653] | 146 | *(.data*) |
---|
[e56c3546] | 147 | . = ALIGN (0x10); |
---|
| 148 | *(.gcc_exc) |
---|
[9e7555e] | 149 | *(.gcc_except_table*) |
---|
[85c92574] | 150 | *(.jcr) |
---|
[e56c3546] | 151 | . = ALIGN (0x10); |
---|
| 152 | *(.gnu.linkonce.d*) |
---|
| 153 | . = ALIGN (0x10); |
---|
| 154 | _edata = .; |
---|
| 155 | copy_end = .; |
---|
| 156 | } > ram |
---|
| 157 | |
---|
| 158 | .bss BLOCK (0x4) : |
---|
| 159 | { |
---|
| 160 | clear_start = . ; |
---|
| 161 | *(.shbss) |
---|
[f331442d] | 162 | *(.dynbss) |
---|
[f54f308] | 163 | *(.bss* .gnu.linkonce.b.*) |
---|
[e56c3546] | 164 | *(COMMON) |
---|
| 165 | . = ALIGN(0x10); |
---|
| 166 | _end = .; |
---|
| 167 | |
---|
| 168 | clear_end = .; |
---|
| 169 | |
---|
| 170 | _WorkspaceBase = .; |
---|
| 171 | __WorkspaceBase = .; |
---|
| 172 | |
---|
| 173 | } > ram |
---|
| 174 | |
---|
| 175 | .stab 0 (NOLOAD) : |
---|
| 176 | { |
---|
| 177 | *(.stab) |
---|
| 178 | } |
---|
| 179 | |
---|
| 180 | .stabstr 0 (NOLOAD) : |
---|
| 181 | { |
---|
| 182 | *(.stabstr) |
---|
| 183 | } |
---|
| 184 | |
---|
| 185 | } |
---|