source: rtems/bsps/m68k/mcf5206elite/start/linkcmds.flash @ e10dec0

Last change on this file since e10dec0 was e10dec0, checked in by Sebastian Huber <sebastian.huber@…>, on 04/30/21 at 13:47:10

bsps: Support RTEMS_NOINIT in linkcmds

Update #3866.

  • Property mode set to 100644
File size: 4.3 KB
Line 
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 *
18 * http://www.rtems.org/license/LICENSE.
19 */
20
21/*
22 * Declare some sizes.
23 * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
24 *      number used there is not constant.  If this happens to you, edit
25 *      the lines marked XXX below to use a constant value.
26 */
27/*
28 * Declare size of heap.
29 * A heap size of 0 means "Use all available memory for the heap".
30 * Initial stack located in on-chip SRAM and not declared there.
31 */
32HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
33
34/*
35 * Declare system clock frequency.
36 */
37_SYS_CLOCK_FREQUENCY = DEFINED(_SYS_CLOCK_FREQUENCY) ? _SYS_CLOCK_FREQUENCY : 54000000;
38
39/*
40 * Setup the memory map of the MCF5206eLITE evaluation board
41 *
42 * The "rom" section is in USER Flash on the board
43 * The "ram" section is placed in USER RAM starting at 10000h
44 *
45 */
46MEMORY
47{
48  ram     : ORIGIN = 0x30000000, LENGTH = 0x00100000
49  rom     : ORIGIN = 0xFFE00000, LENGTH = 0x00100000
50}
51
52MBase = 0x10000000;
53
54ENTRY(start)
55STARTUP(start.o)
56
57/* Interrupt Vector table located at start of external static RAM */
58_VBR = 0x30000000;
59
60SECTIONS
61{
62  /*
63   * Flash ROM
64   */
65  rom : {
66        _RomBase = .;
67  } >rom
68
69  /*
70   * Dynamic RAM
71   */
72  ram : {
73          RamBase = .;
74          RamBase = .;
75  } >ram
76
77  /*
78   * Text, data and bss segments
79   */
80   .text : AT(0x30020000) {
81           CREATE_OBJECT_SYMBOLS
82           *(.text*)
83
84           /*
85            * C++ constructors/destructors
86            */
87           *(.gnu.linkonce.t.*)
88
89           /*
90            * Initialization and finalization code.
91            */
92           . = ALIGN (16);
93           PROVIDE (_init = .);
94           *crti.o(.init)
95           *(.init)
96           *crtn.o(.init)
97           . = ALIGN (16);
98           PROVIDE (_fini = .);
99           *crti.o(.fini)
100           *(.fini)
101           *crtn.o(.fini)
102
103           /*
104            * Special FreeBSD sysctl sections.
105            */
106           . = ALIGN (16);
107           __start_set_sysctl_set = .;
108           *(set_sysctl_*);
109           __stop_set_sysctl_set = ABSOLUTE(.);
110           *(set_domain_*);
111           *(set_pseudo_*);
112
113           /*
114            * C++ constructors/destructors
115            */
116           . = ALIGN (16);
117           *crtbegin.o(.ctors)
118           *(.ctors)
119           *crtend.o(.ctors)
120           *crtbegin.o(.dtors)
121           *(.dtors)
122           *crtend.o(.dtors)
123
124           /*
125            * Exception frame info
126            */
127           . = ALIGN (16);
128           *(.eh_frame)
129
130           /*
131            * Read-only data
132            */
133           . = ALIGN (16);
134           _rodata_start = . ;
135           *(.rodata)
136           KEEP (*(SORT(.rtemsroset.*)))
137           *(.gnu.linkonce.r*)
138
139           . = ALIGN (16);
140           PROVIDE (etext = .);
141
142   } >rom
143
144  .tdata : {
145    _TLS_Data_begin = .;
146    *(.tdata .tdata.* .gnu.linkonce.td.*)
147    _TLS_Data_end = .;
148  } >rom
149
150  .tbss : {
151    _TLS_BSS_begin = .;
152    *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
153    _TLS_BSS_end = .;
154  } >rom
155
156  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
157  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
158  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
159  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
160  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
161  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
162
163   .data 0x30000400 : AT(LOADADDR(.text) + SIZEOF(.text)) {
164           copy_start = .;
165           . = ALIGN (0x10);
166           *(.shdata)
167           . = ALIGN (0x10);
168           *(.data)
169           KEEP (*(SORT(.rtemsrwset.*)))
170           . = ALIGN (0x10);
171           *(.gcc_exc)
172           *(.gcc_except_table*)
173           . = ALIGN (0x10);
174           *(.gnu.linkonce.d*)
175           . = ALIGN (0x10);
176           _edata = .;
177           copy_end = .;
178   } >ram
179
180  .bss BLOCK (0x4) :
181  {
182    clear_start = . ;
183    *(.shbss)
184    *(.dynbss)
185    *(.bss* .gnu.linkonce.b.*)
186    *(COMMON)
187    . = ALIGN(0x10);
188    _end = .;
189   
190    clear_end = .;
191  } > ram
192
193  .noinit (NOLOAD) : {
194    *(.noinit*)
195  } >ram
196
197  .rtemsstack (NOLOAD) : {
198    *(SORT(.rtemsstack.*))
199    WorkAreaBase = .;
200  } > ram
201
202  .stab 0 (NOLOAD) :
203  {
204    *(.stab)
205  }
206
207  .stabstr 0 (NOLOAD) :
208  {
209    *(.stabstr)
210  }
211 
212}
Note: See TracBrowser for help on using the repository browser.