source: rtems/bsps/m68k/av5282/start/linkcmdsram @ ffa1153

5
Last change on this file since ffa1153 was ffa1153, checked in by Sebastian Huber <sebastian.huber@…>, on 12/14/19 at 20:36:09

bsps: Add RamEnd? to linker command files

Update #3838.

  • Property mode set to 100644
File size: 5.4 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the Arcturus uC DIMM ColdFire 5282
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.org/license/LICENSE.
11 */
12
13/*
14 * Declare some sizes.
15 */
16RamBase = DEFINED(RamBase) ? RamBase : 0x0;
17RamSize = DEFINED(RamSize) ? RamSize : 16M;
18RamEnd = RamBase + RamSize;
19HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
20_VBR = 0x0;
21
22/*
23 * System clock speed
24 */
25_CPUClockSpeed = DEFINED(_CPUClockSpeed) ? _CPUClockSpeed : 58976000 ;
26
27/*
28 * Location of on-chip devicesa
29 */
30__IPSBAR = DEFINED(__IPSBAR) ? __IPSBAR : 0x40000000 ;
31__SRAMBASE = DEFINED(__SRAMBASE) ? __SRAMBASE : 0x20000000 ;
32
33ENTRY(start)
34STARTUP(start.o)
35
36MEMORY
37{
38    ram : ORIGIN = 0, LENGTH = 16M
39    sram : ORIGIN = 0x20000000, LENGTH = 64K
40    flash : ORIGIN = 0xFF800000, LENGTH = 8M
41}
42
43SECTIONS
44{
45   
46    _header_offset = 0;
47   
48    /*
49     * Text, data and bss segments
50     */
51    .text 0x40000 : {
52       
53       *(.text*)
54        *(.ram_code)
55
56        /*
57         * C++ constructors/destructors
58         */
59        *(.gnu.linkonce.t.*)
60
61        /*
62         * Initialization and finalization code.
63              *
64              * Various files can provide initialization and finalization
65         * functions.  crtbegin.o and crtend.o are two instances. The
66         * body of these functions are in .init and .fini sections. We
67         * accumulate the bodies here, and prepend function prologues
68         * from crti.o and function epilogues from crtn.o. crti.o must
69         * be linked first; crtn.o must be linked last.  Because these
70         * are wildcards, it doesn't matter if the user does not
71         * actually link against crti.o and crtn.o; the linker won't
72         * look for a file to match a wildcard.  The wildcard also
73         * means that it doesn't matter which directory crti.o and
74         * crtn.o are in.
75         */
76        PROVIDE (_init = .);
77        *crti.o(.init)
78        *(.init)
79        *crtn.o(.init)
80        PROVIDE (_fini = .);
81        *crti.o(.fini)
82        *(.fini)
83        *crtn.o(.fini)
84
85        /*
86         * Special FreeBSD sysctl sections.
87         */
88        . = ALIGN (16);
89        __start_set_sysctl_set = .;
90        *(set_sysctl_*);
91        __stop_set_sysctl_set = ABSOLUTE(.);
92        *(set_domain_*);
93        *(set_pseudo_*);
94
95
96        /*
97         * C++ constructors/destructors
98         *
99         * gcc uses crtbegin.o to find the start of the constructors
100         * and destructors so we make sure it is first.  Because this
101         * is a wildcard, it doesn't matter if the user does not
102         * actually link against crtbegin.o; the linker won't look for
103         * a file to match a wildcard.  The wildcard also means that
104         * it doesn't matter which directory crtbegin.o is in. The
105         * constructor and destructor list are terminated in
106         * crtend.o.  The same comments apply to it.
107         */
108        . = ALIGN (16);
109        *crtbegin.o(.ctors)
110        *(.ctors)
111        *crtend.o(.ctors)
112        *crtbegin.o(.dtors)
113        *(.dtors)
114        *crtend.o(.dtors)
115
116        /*
117         * Exception frame info
118         */
119        . = ALIGN (16);
120        *(.eh_frame)
121
122        /*
123         * Read-only data
124         */
125        . = ALIGN (16);
126        _rodata_start = . ;
127        *(.rodata*)
128        KEEP (*(SORT(.rtemsroset.*)))
129        *(.gnu.linkonce.r*)
130       
131        . = ALIGN (16);
132
133        *(.console_gdb_xfer)
134        *(.bootstrap_data)
135        . = ALIGN(16);
136        _estuff = .;
137    PROVIDE (_etext = .);
138    } >ram
139
140    .tdata : {
141        _TLS_Data_begin = .;
142        *(.tdata .tdata.* .gnu.linkonce.td.*)
143        _TLS_Data_end = .;
144    } >ram
145
146    .tbss : {
147        _TLS_BSS_begin = .;
148        *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
149        _TLS_BSS_end = .;
150    } >ram
151
152    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
153    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
154    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
155    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
156    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
157    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
158       
159        .data : {
160            PROVIDE( _data_dest_start = . );
161            PROVIDE( _copy_start = .);
162            *(.data)
163            KEEP (*(SORT(.rtemsrwset.*)))
164            *(.gnu.linkonce.d*)
165            *(.gcc_except_table*)
166            *(.jcr)
167            . = ALIGN (16);
168            PROVIDE (_edata = .);
169        PROVIDE (_copy_end = .);
170        PROVIDE (_data_dest_end = . );
171        } >ram
172
173        _data_src_start = _estuff;
174        _data_src_end = _data_dest_start + SIZEOF(.data);       
175       
176        .bss : {
177                _clear_start = .;
178                *(.bss*)
179                *(COMMON)
180                . = ALIGN (16);
181                PROVIDE (end = .);
182                _clear_end = .;
183        } >ram
184
185        .rtemsstack (NOLOAD) : {
186                *(SORT(.rtemsstack.*))
187                WorkAreaBase = .;
188        } >ram
189
190  /* Stabs debugging sections.  */
191  .stab 0 : { *(.stab) }
192  .stabstr 0 : { *(.stabstr) }
193  .stab.excl 0 : { *(.stab.excl) }
194  .stab.exclstr 0 : { *(.stab.exclstr) }
195  .stab.index 0 : { *(.stab.index) }
196  .stab.indexstr 0 : { *(.stab.indexstr) }
197  .comment 0 : { *(.comment) }
198
199PROVIDE (end_of_all = .); 
200}
Note: See TracBrowser for help on using the repository browser.