source: rtems/c/src/lib/libbsp/m68k/av5282/startup/linkcmds @ 33aa635

4.104.114.9
Last change on this file since 33aa635 was 33aa635, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 3, 2008 at 11:06:27 PM

2008-03-03 Joel Sherrill <joel.sherrill@…>

  • startup/linkcmds, startup/linkcmdsflash, startup/linkcmdsram: Add wildcard to gcc_except_table section so programs compiled with gcc 4.3.x can link.
  • Property mode set to 100644
File size: 4.6 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.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14
15/*
16 * Declare some sizes.
17 */
18_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0 ;
19_RamSize = DEFINED(_RamSize) ? _RamSize : 16M ;
20_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0 ;
21_VBR = 0x0;
22
23/*
24 * System clock speed
25 */
26_CPUClockSpeed = DEFINED(_CPUClockSpeed) ? _CPUClockSpeed : 58976000 ;
27
28/*
29 * Location of on-chip devicesa
30 */
31__IPSBAR = DEFINED(__IPSBAR) ? __IPSBAR : 0x40000000 ;
32__SRAMBASE = DEFINED(__SRAMBASE) ? __SRAMBASE : 0x20000000 ;
33
34
35ENTRY(start)
36MEMORY
37{
38    ram : ORIGIN = 0, LENGTH = 16M
39    sram : ORIGIN = 0x20000000, LENGTH = 64K
40    flash : ORIGIN = 0xFF800000, LENGTH = 8M
41}
42
43SECTIONS
44{
45   
46    _header_offset = 0;
47   
48    /*
49     * Text, data and bss segments
50     */
51    .text 0x40000 : {
52       
53       *(.text*)
54        *(.ram_code)
55
56        /*
57         * C++ constructors/destructors
58         */
59        *(.gnu.linkonce.t.*)
60
61        /*
62         * Initialization and finalization code.
63              *
64              * Various files can provide initialization and finalization
65         * functions.  crtbegin.o and crtend.o are two instances. The
66         * body of these functions are in .init and .fini sections. We
67         * accumulate the bodies here, and prepend function prologues
68         * from crti.o and function epilogues from crtn.o. crti.o must
69         * be linked first; crtn.o must be linked last.  Because these
70         * are wildcards, it doesn't matter if the user does not
71         * actually link against crti.o and crtn.o; the linker won't
72         * look for a file to match a wildcard.  The wildcard also
73         * means that it doesn't matter which directory crti.o and
74         * crtn.o are in.
75         */
76        PROVIDE (_init = .);
77        *crti.o(.init)
78        *(.init)
79        *crtn.o(.init)
80        PROVIDE (_fini = .);
81        *crti.o(.fini)
82        *(.fini)
83        *crtn.o(.fini)
84
85        /*
86         * Special FreeBSD sysctl sections.
87         */
88        . = ALIGN (16);
89        __start_set_sysctl_set = .;
90        *(set_sysctl_*);
91        __stop_set_sysctl_set = ABSOLUTE(.);
92        *(set_domain_*);
93        *(set_pseudo_*);
94
95
96        /*
97         * C++ constructors/destructors
98         *
99         * gcc uses crtbegin.o to find the start of the constructors
100         * and destructors so we make sure it is first.  Because this
101         * is a wildcard, it doesn't matter if the user does not
102         * actually link against crtbegin.o; the linker won't look for
103         * a file to match a wildcard.  The wildcard also means that
104         * it doesn't matter which directory crtbegin.o is in. The
105         * constructor and destructor list are terminated in
106         * crtend.o.  The same comments apply to it.
107         */
108        . = ALIGN (16);
109        *crtbegin.o(.ctors)
110        *(.ctors)
111        *crtend.o(.ctors)
112        *crtbegin.o(.dtors)
113        *(.dtors)
114        *crtend.o(.dtors)
115
116        /*
117         * Exception frame info
118         */
119        . = ALIGN (16);
120        *(.eh_frame)
121
122        /*
123         * Read-only data
124         */
125        . = ALIGN (16);
126        _rodata_start = . ;
127        *(.rodata*)
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    } >ram
138       
139        .data : {
140            PROVIDE( _data_dest_start = . );
141            PROVIDE( _copy_start = .);
142            *(.data*)
143            *(.gnu.linkonce.d*)
144            *(.gcc_except_table*)
145            *(.jcr)
146            . = ALIGN (16);
147            PROVIDE (_edata = .);
148        PROVIDE (_copy_end = .);
149        PROVIDE (_data_dest_end = . );
150        } >ram
151
152        _data_src_start = _estuff;
153        _data_src_end = _data_dest_start + SIZEOF(.data);       
154       
155        .bss : {
156                _clear_start = .;
157                *(.bss*)
158                *(COMMON)
159                . = ALIGN (16);
160                PROVIDE (end = .);
161                _clear_end = .;
162
163                _WorkspaceBase = .;
164        } >ram
165  /* Stabs debugging sections.  */
166  .stab 0 : { *(.stab) }
167  .stabstr 0 : { *(.stabstr) }
168  .stab.excl 0 : { *(.stab.excl) }
169  .stab.exclstr 0 : { *(.stab.exclstr) }
170  .stab.index 0 : { *(.stab.index) }
171  .stab.indexstr 0 : { *(.stab.indexstr) }
172  .comment 0 : { *(.comment) }
173
174PROVIDE (end_of_all = .); 
175}
Note: See TracBrowser for help on using the repository browser.