source: rtems/c/src/lib/libbsp/m68k/mcf5329/startup/linkcmdsflash @ 6b56ec3

4.104.114.95
Last change on this file since 6b56ec3 was 6b56ec3, checked in by Joel Sherrill <joel.sherrill@…>, on 06/20/08 at 14:58:34

2008-06-20 Matthew Riek <matthew.riek@…>

  • ChangeLog?, Makefile.am, README, bsp_specs, configure.ac, gdb-init, preinstall.am, clock/clock.c, console/console.c, include/bsp.h, include/bspopts.h.in, include/coverhd.h, include/tm27.h, network/network.c, start/start.S, startup/bspclean.c, startup/bspstart.c, startup/cfinit.c, startup/init5329.c, startup/linkcmds, startup/linkcmdsflash, timer/timer.c: New files.
  • Property mode set to 100644
File size: 4.7 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the Freescale ColdFire mcf52235
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.com/license/LICENSE.e
11 *
12 *  $Id$
13 */
14
15/*
16 * Declare some sizes.
17 */
18_CoreSRamBase = DEFINED(_RamBase) ? _RamBase : 0x80000000;
19_CoreSRamSize = DEFINED(_RamSize) ? _RamSize : 32K;
20
21_RamBase = DEFINED(_RamBase) ? _RamBase : 0x40000000;
22_RamSize = DEFINED(_RamSize) ? _RamSize : 32M;
23
24_BootFlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000;
25_BootFlashSize = DEFINED(_FlashBase) ? _FlashBase : 2M;
26
27_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0;
28_StackSize = DEFINED(_StackSize) ? _StackSize : 0x400;
29
30_VBR = 0x40000000;
31
32ENTRY(start)
33
34MEMORY
35{
36    core_sram : ORIGIN = 0x80000000, LENGTH = 32K
37    boot_flash : ORIGIN = 0x00000000, LENGTH = 2M
38    dram : ORIGIN = 0x40000000, LENGTH = 32M
39}
40
41SECTIONS
42{
43    /*
44    * Text, data and bss segments
45    */
46    .text : {
47
48        *(.text*)
49        *(.ram_code)
50
51        /*
52        * C++ constructors/destructors
53        */
54        *(.gnu.linkonce.t.*)
55
56        /*
57        * Initialization and finalization code.
58        *
59        * Various files can provide initialization and finalization
60        * functions.  crtbegin.o and crtend.o are two instances. The
61        * body of these functions are in .init and .fini sections. We
62        * accumulate the bodies here, and prepend function prologues
63        * from crti.o and function epilogues from crtn.o. crti.o must
64        * be linked first; crtn.o must be linked last.  Because these
65        * are wildcards, it doesn't matter if the user does not
66        * actually link against crti.o and crtn.o; the linker won't
67        * look for a file to match a wildcard.  The wildcard also
68        * means that it doesn't matter which directory crti.o and
69        * crtn.o are in.
70        */
71        PROVIDE (_init = .);
72        *crti.o(.init)
73        *(.init)
74        *crtn.o(.init)
75        PROVIDE (_fini = .);
76        *crti.o(.fini)
77        *(.fini)
78        *crtn.o(.fini)
79
80        /*
81            * Special FreeBSD sysctl sections.
82            */
83        . = ALIGN (16);
84        __start_set_sysctl_set = .;
85        *(set_sysctl_*);
86        __stop_set_sysctl_set = ABSOLUTE(.);
87        *(set_domain_*);
88        *(set_pseudo_*);
89
90        /*
91        * C++ constructors/destructors
92        *
93        * gcc uses crtbegin.o to find the start of the constructors
94        * and destructors so we make sure it is first.  Because this
95        * is a wildcard, it doesn't matter if the user does not
96        * actually link against crtbegin.o; the linker won't look for
97        * a file to match a wildcard.  The wildcard also means that
98        * it doesn't matter which directory crtbegin.o is in. The
99        * constructor and destructor list are terminated in
100        * crtend.o.  The same comments apply to it.
101        */
102        . = ALIGN (16);
103        *crtbegin.o(.ctors)
104        *(.ctors)
105        *crtend.o(.ctors)
106        *crtbegin.o(.dtors)
107        *(.dtors)
108        *crtend.o(.dtors)
109
110        /*
111        * Exception frame info
112        */
113        . = ALIGN (16);
114        *(.eh_frame)
115
116        /*
117        * Read-only data
118        */
119        . = ALIGN (16);
120        _rodata_start = . ;
121        *(.rodata*)
122        *(.gnu.linkonce.r*)
123
124        . = ALIGN (16);
125
126        *(.console_gdb_xfer)
127        *(.bootstrap_data)
128        . = ALIGN(16);
129        _estuff = .;
130        PROVIDE (_etext = .);
131    } > boot_flash
132
133    .data 0x40000500 : AT (_estuff)
134    {
135        PROVIDE( _data_dest_start = . );
136        PROVIDE( _copy_start = .);
137        *(.data)
138        *(.gnu.linkonce.d*)
139        *(.gcc_except_table*)
140        *(.jcr)
141        . = ALIGN (16);
142        PROVIDE (_edata = .);
143        PROVIDE (_copy_end = .);
144        PROVIDE (_data_dest_end = . );
145    } > dram
146
147    _data_src_start = _estuff;
148    _data_src_end = _data_dest_start + SIZEOF(.data);
149
150    .bss :
151    {
152        _clear_start = .;
153        *(.bss*)
154        *(COMMON)
155        . = ALIGN (16);
156        PROVIDE (_end = .);
157
158        _clear_end = .;
159        _WorkspaceBase = .;
160    } > dram
161
162    .start_stack :
163    {
164        /*
165         * Starting Stack
166         */
167        . += _StackSize;
168        . = ALIGN (16);
169        PROVIDE(_StackInit = .);
170    } > core_sram
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    PROVIDE (end_of_all = .);
182}
Note: See TracBrowser for help on using the repository browser.