source: rtems/c/src/lib/libbsp/m68k/av5282/startup/linkcmdsram @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

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