source: rtems/bsps/m68k/av5282/start/linkcmds @ 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: 5.5 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-2007.
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
33
34ENTRY(start)
35STARTUP(start.o)
36
37MEMORY
38{
39    ram : ORIGIN = 0, LENGTH = 16M
40    sram : ORIGIN = 0x20000000, LENGTH = 64K
41    flash : ORIGIN = 0xFF800000, LENGTH = 8M
42}
43
44SECTIONS
45{
46   
47    _header_offset = 0;
48   
49    /*
50     * Text, data and bss segments
51     */
52    .text 0x40000 : {
53       
54       *(.text*)
55        *(.ram_code)
56
57        /*
58         * C++ constructors/destructors
59         */
60        *(.gnu.linkonce.t.*)
61
62        /*
63         * Initialization and finalization code.
64              *
65              * Various files can provide initialization and finalization
66         * functions.  crtbegin.o and crtend.o are two instances. The
67         * body of these functions are in .init and .fini sections. We
68         * accumulate the bodies here, and prepend function prologues
69         * from crti.o and function epilogues from crtn.o. crti.o must
70         * be linked first; crtn.o must be linked last.  Because these
71         * are wildcards, it doesn't matter if the user does not
72         * actually link against crti.o and crtn.o; the linker won't
73         * look for a file to match a wildcard.  The wildcard also
74         * means that it doesn't matter which directory crti.o and
75         * crtn.o are in.
76         */
77        PROVIDE (_init = .);
78        *crti.o(.init)
79        *(.init)
80        *crtn.o(.init)
81        PROVIDE (_fini = .);
82        *crti.o(.fini)
83        *(.fini)
84        *crtn.o(.fini)
85
86        /*
87         * Special FreeBSD sysctl sections.
88         */
89        . = ALIGN (16);
90        __start_set_sysctl_set = .;
91        *(set_sysctl_*);
92        __stop_set_sysctl_set = ABSOLUTE(.);
93        *(set_domain_*);
94        *(set_pseudo_*);
95
96
97        /*
98         * C++ constructors/destructors
99         *
100         * gcc uses crtbegin.o to find the start of the constructors
101         * and destructors so we make sure it is first.  Because this
102         * is a wildcard, it doesn't matter if the user does not
103         * actually link against crtbegin.o; the linker won't look for
104         * a file to match a wildcard.  The wildcard also means that
105         * it doesn't matter which directory crtbegin.o is in. The
106         * constructor and destructor list are terminated in
107         * crtend.o.  The same comments apply to it.
108         */
109        . = ALIGN (16);
110        *crtbegin.o(.ctors)
111        *(.ctors)
112        *crtend.o(.ctors)
113        *crtbegin.o(.dtors)
114        *(.dtors)
115        *crtend.o(.dtors)
116
117        /*
118         * Exception frame info
119         */
120        . = ALIGN (16);
121        *(.eh_frame)
122
123        /*
124         * Read-only data
125         */
126        . = ALIGN (16);
127        _rodata_start = . ;
128        *(.rodata*)
129        KEEP (*(SORT(.rtemsroset.*)))
130        *(.gnu.linkonce.r*)
131       
132        . = ALIGN (16);
133
134        *(.console_gdb_xfer)
135        *(.bootstrap_data)
136        . = ALIGN(16);
137        _estuff = .;
138    PROVIDE (_etext = .);
139    } >ram
140
141    .tdata : {
142        _TLS_Data_begin = .;
143        *(.tdata .tdata.* .gnu.linkonce.td.*)
144        _TLS_Data_end = .;
145    } >ram
146
147    .tbss : {
148        _TLS_BSS_begin = .;
149        *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
150        _TLS_BSS_end = .;
151    } >ram
152
153    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
154    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
155    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
156    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
157    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
158    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
159       
160        .data : {
161            PROVIDE( _data_dest_start = . );
162            PROVIDE( _copy_start = .);
163            *(.data*)
164            KEEP (*(SORT(.rtemsrwset.*)))
165            *(.gnu.linkonce.d*)
166            *(.gcc_except_table*)
167            *(.jcr)
168            . = ALIGN (16);
169            PROVIDE (_edata = .);
170        PROVIDE (_copy_end = .);
171        PROVIDE (_data_dest_end = . );
172        } >ram
173
174        _data_src_start = _estuff;
175        _data_src_end = _data_dest_start + SIZEOF(.data);       
176       
177        .bss : {
178                _clear_start = .;
179                *(.bss*)
180                *(COMMON)
181                . = ALIGN (16);
182                PROVIDE (end = .);
183                _clear_end = .;
184        } >ram
185
186        .noinit (NOLOAD) : {
187                *(.noinit*)
188        } >ram
189
190        .rtemsstack (NOLOAD) : {
191                *(SORT(.rtemsstack.*))
192                WorkAreaBase = .;
193        } >ram
194
195  /* Stabs debugging sections.  */
196  .stab 0 : { *(.stab) }
197  .stabstr 0 : { *(.stabstr) }
198  .stab.excl 0 : { *(.stab.excl) }
199  .stab.exclstr 0 : { *(.stab.exclstr) }
200  .stab.index 0 : { *(.stab.index) }
201  .stab.indexstr 0 : { *(.stab.indexstr) }
202  .comment 0 : { *(.comment) }
203
204PROVIDE (end_of_all = .); 
205}
Note: See TracBrowser for help on using the repository browser.