source: rtems/c/src/lib/libbsp/m68k/av5282/startup/linkcmdsflash @ 9a5cf9c0

5
Last change on this file since 9a5cf9c0 was 9a5cf9c0, checked in by Joel Sherrill <joel@…>, on 12/19/17 at 16:32:58

av5282: Simplify bsp_specs

Updates #3520.

  • Property mode set to 100644
File size: 5.3 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;
18HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
19_VBR = 0x0;
20
21/*
22 * System clock speed
23 */
24_CPUClockSpeed = DEFINED(_CPUClockSpeed) ? _CPUClockSpeed : 58976000 ;
25
26/*
27 * Location of on-chip devicesa
28 */
29__IPSBAR = DEFINED(__IPSBAR) ? __IPSBAR : 0x40000000 ;
30__SRAMBASE = DEFINED(__SRAMBASE) ? __SRAMBASE : 0x20000000 ;
31
32ENTRY(start)
33STARTUP(start.o)
34
35MEMORY
36{
37    ram : ORIGIN = 0, LENGTH = 16M
38    sram : ORIGIN = 0x20000000, LENGTH = 64K
39    flash : ORIGIN = 0xFF800000, LENGTH = 8M
40}
41
42SECTIONS
43{
44   
45    _header_offset = 0;
46   
47    /*
48     * Text, data and bss segments
49     */
50    .text : {
51       
52       *(.text*)
53        *(.ram_code)
54
55        /*
56         * C++ constructors/destructors
57         */
58        *(.gnu.linkonce.t.*)
59
60        /*
61         * Initialization and finalization code.
62              *
63              * Various files can provide initialization and finalization
64         * functions.  crtbegin.o and crtend.o are two instances. The
65         * body of these functions are in .init and .fini sections. We
66         * accumulate the bodies here, and prepend function prologues
67         * from crti.o and function epilogues from crtn.o. crti.o must
68         * be linked first; crtn.o must be linked last.  Because these
69         * are wildcards, it doesn't matter if the user does not
70         * actually link against crti.o and crtn.o; the linker won't
71         * look for a file to match a wildcard.  The wildcard also
72         * means that it doesn't matter which directory crti.o and
73         * crtn.o are in.
74         */
75        PROVIDE (_init = .);
76        *crti.o(.init)
77        *(.init)
78        *crtn.o(.init)
79        PROVIDE (_fini = .);
80        *crti.o(.fini)
81        *(.fini)
82        *crtn.o(.fini)
83
84        /*
85         * Special FreeBSD sysctl sections.
86         */
87        . = ALIGN (16);
88        __start_set_sysctl_set = .;
89        *(set_sysctl_*);
90        __stop_set_sysctl_set = ABSOLUTE(.);
91        *(set_domain_*);
92        *(set_pseudo_*);
93
94
95        /*
96         * C++ constructors/destructors
97         *
98         * gcc uses crtbegin.o to find the start of the constructors
99         * and destructors so we make sure it is first.  Because this
100         * is a wildcard, it doesn't matter if the user does not
101         * actually link against crtbegin.o; the linker won't look for
102         * a file to match a wildcard.  The wildcard also means that
103         * it doesn't matter which directory crtbegin.o is in. The
104         * constructor and destructor list are terminated in
105         * crtend.o.  The same comments apply to it.
106         */
107        . = ALIGN (16);
108        *crtbegin.o(.ctors)
109        *(.ctors)
110        *crtend.o(.ctors)
111        *crtbegin.o(.dtors)
112        *(.dtors)
113        *crtend.o(.dtors)
114
115        /*
116         * Exception frame info
117         */
118        . = ALIGN (16);
119        *(.eh_frame)
120
121        /*
122         * Read-only data
123         */
124        . = ALIGN (16);
125        _rodata_start = . ;
126        *(.rodata*)
127        KEEP (*(SORT(.rtemsroset.*)))
128        *(.gnu.linkonce.r*)
129       
130        . = ALIGN (16);
131
132        *(.console_gdb_xfer)
133        *(.bootstrap_data)
134        . = ALIGN(16);
135        _estuff = .;
136    PROVIDE (_etext = .);
137    } >flash
138
139    .tdata : {
140        _TLS_Data_begin = .;
141        *(.tdata .tdata.* .gnu.linkonce.td.*)
142        _TLS_Data_end = .;
143    } >flash
144
145    .tbss : {
146        _TLS_BSS_begin = .;
147        *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
148        _TLS_BSS_end = .;
149    } >flash
150
151    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
152    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
153    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
154    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
155    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
156    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
157       
158        .data 0x1000 : AT ( ADDR(.tdata) + SIZEOF ( .tdata ) )
159        {
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        }
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
184                WorkAreaBase = .;
185        }
186  /* Stabs debugging sections.  */
187  .stab 0 : { *(.stab) }
188  .stabstr 0 : { *(.stabstr) }
189  .stab.excl 0 : { *(.stab.excl) }
190  .stab.exclstr 0 : { *(.stab.exclstr) }
191  .stab.index 0 : { *(.stab.index) }
192  .stab.indexstr 0 : { *(.stab.indexstr) }
193  .comment 0 : { *(.comment) }
194
195PROVIDE (end_of_all = .); 
196}
Note: See TracBrowser for help on using the repository browser.