source: rtems/c/src/lib/libbsp/m68k/uC5282/startup/linkcmds @ 18aa55ee

4.104.11
Last change on this file since 18aa55ee was 18aa55ee, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 16, 2008 at 7:03:48 PM

2008-09-16 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Add use of bsp_get_work_area() in its own file and rely on BSP Framework to perform more initialization. Remove unnecessary includes of rtems/libio.h and rtems/libcsupport.h.
  • Property mode set to 100644
File size: 5.7 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 *  Author: W. Eric Norum <norume@aps.anl.gov>
6 *
7 *  COPYRIGHT (c) 2005-2007.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.com/license/LICENSE.
13 *
14 *  $Id$
15 */
16
17/*
18 * Declare some locations and sizes.
19 */
20_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
21_RamSize = DEFINED(_RamSize) ? _RamSize : 16M;
22_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0;
23_FlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x10000000;
24_FlashSize = DEFINED(_FlashSize) ? _FlashSize : 4M ;
25
26/*
27 * Location of downloaded (from TFTP or flash) file
28 */
29_DownloadLocation = 0x40000;
30
31/*
32 * System clock speed
33 */
34_CPUClockSpeed = DEFINED(_CPUClockSpeed) ? _CPUClockSpeed : 64000000 ;
35
36/*
37 * Location of on-chip devices
38 */
39__IPSBAR = DEFINED(__IPSBAR) ? __IPSBAR : 0x40000000 ;
40__SRAMBASE = DEFINED(__SRAMBASE) ? __SRAMBASE : 0x20000000 ;
41_VBR = 0x0;
42
43ENTRY(start)
44MEMORY
45{
46    ram : ORIGIN = 0, LENGTH = 16M
47    sram : ORIGIN = 0x20000000, LENGTH = 64k
48}
49
50SECTIONS
51{
52
53    _header_offset = 0;
54
55    /*
56     * Text, data and bss segments
57     */
58    .text _DownloadLocation : {
59
60        *(.text*)
61        *(.ram_code)
62
63        /*
64         * C++ constructors/destructors
65         */
66        *(.gnu.linkonce.t.*)
67
68        /*
69         * Initialization and finalization code.
70         *
71         * Various files can provide initialization and finalization
72         * functions.  crtbegin.o and crtend.o are two instances. The
73         * body of these functions are in .init and .fini sections. We
74         * accumulate the bodies here, and prepend function prologues
75         * from crti.o and function epilogues from crtn.o. crti.o must
76         * be linked first; crtn.o must be linked last.  Because these
77         * are wildcards, it doesn't matter if the user does not
78         * actually link against crti.o and crtn.o; the linker won't
79         * look for a file to match a wildcard.  The wildcard also
80         * means that it doesn't matter which directory crti.o and
81         * crtn.o are in.
82         */
83        PROVIDE (_init = .);
84        *crti.o(.init)
85        *(.init)
86        *crtn.o(.init)
87        PROVIDE (_fini = .);
88        *crti.o(.fini)
89        *(.fini)
90        *crtn.o(.fini)
91
92        /*
93         * Special FreeBSD sysctl sections.
94         */
95        . = ALIGN (16);
96        __start_set_sysctl_set = .;
97        *(set_sysctl_*);
98        __stop_set_sysctl_set = ABSOLUTE(.);
99        *(set_domain_*);
100        *(set_pseudo_*);
101
102        /*
103         * C++ constructors/destructors
104         *
105         * gcc uses crtbegin.o to find the start of the constructors
106         * and destructors so we make sure it is first.  Because this
107         * is a wildcard, it doesn't matter if the user does not
108         * actually link against crtbegin.o; the linker won't look for
109         * a file to match a wildcard.  The wildcard also means that
110         * it doesn't matter which directory crtbegin.o is in. The
111         * constructor and destructor list are terminated in
112         * crtend.o.  The same comments apply to it.
113         */
114        . = ALIGN (16);
115        *crtbegin.o(.ctors)
116        *(.ctors)
117        *crtend.o(.ctors)
118        *crtbegin.o(.dtors)
119        *(.dtors)
120        *crtend.o(.dtors)
121
122        /*
123         * Exception frame info
124         */
125        . = ALIGN (16);
126        *(.eh_frame)
127
128        /*
129         * Read-only data
130         */
131        . = ALIGN (16);
132        _rodata_start = . ;
133        *(.rodata*)
134        *(.gnu.linkonce.r*)
135
136        . = ALIGN (16);
137
138        *(.console_gdb_xfer)
139        *(.bootstrap_data)
140        . = ALIGN(16);
141        _estuff = .;
142        PROVIDE (_etext = .);
143    } >ram
144
145    .data : {
146        PROVIDE( _data_dest_start = . );
147        PROVIDE( _copy_start = .);
148        *(.data*)
149        *(.gnu.linkonce.d*)
150        *(.gcc_except_table*)
151        *(.jcr)
152        . = ALIGN (16);
153        PROVIDE (_edata = .);
154        PROVIDE (_copy_end = .);
155        PROVIDE (_data_dest_end = . );
156    } >ram
157
158    _data_src_start = LOADADDR(.data);
159    _data_src_end = _data_src_start + SIZEOF(.data);
160
161    .bss : {
162        _clear_start = .;
163        *(.bss*)
164        *(.gnu.linkonce.b.*)
165        *(COMMON)
166        . = ALIGN (16);
167        PROVIDE (end = .);
168        _clear_end = .;
169        _WorkspaceBase = .;
170    } >ram
171
172  /* Stabs debugging sections.  */
173  .stab 0 : { *(.stab) }
174  .stabstr 0 : { *(.stabstr) }
175  .stab.excl 0 : { *(.stab.excl) }
176  .stab.exclstr 0 : { *(.stab.exclstr) }
177  .stab.index 0 : { *(.stab.index) }
178  .stab.indexstr 0 : { *(.stab.indexstr) }
179  .comment 0 : { *(.comment) }
180
181  /* DWARF debug sections.
182     Symbols in the DWARF debugging sections are relative to the beginning
183     of the section so we begin them at 0.  */
184  /* DWARF 1 */
185  .debug          0 : { *(.debug) }
186  .line           0 : { *(.line) }
187
188  /* GNU DWARF 1 extensions */
189  .debug_srcinfo  0 : { *(.debug_srcinfo) }
190  .debug_sfnames  0 : { *(.debug_sfnames) }
191
192  /* DWARF 1.1 and DWARF 2 */
193  .debug_aranges  0 : { *(.debug_aranges) }
194  .debug_pubnames 0 : { *(.debug_pubnames) }
195
196  /* DWARF 2 */
197  .debug_info     0 : { *(.debug_info) }
198  .debug_abbrev   0 : { *(.debug_abbrev) }
199  .debug_line     0 : { *(.debug_line) }
200  .debug_frame    0 : { *(.debug_frame) }
201  .debug_str      0 : { *(.debug_str) }
202  .debug_loc      0 : { *(.debug_loc) }
203  .debug_macinfo  0 : { *(.debug_macinfo) }
204
205  /* SGI/MIPS DWARF 2 extensions */
206  .debug_weaknames 0 : { *(.debug_weaknames) }
207  .debug_funcnames 0 : { *(.debug_funcnames) }
208  .debug_typenames 0 : { *(.debug_typenames) }
209  .debug_varnames  0 : { *(.debug_varnames) }
210  /* These must appear regardless of  .  */
211
212PROVIDE (end_of_all = .);
213}
Note: See TracBrowser for help on using the repository browser.