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

4.104.114.84.95
Last change on this file since d452949f was d452949f, checked in by Eric Norum <WENorum@…>, on 07/24/05 at 19:10:31

Add .gnu.linkonce.b

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