source: rtems/bsps/m68k/csb360/start/linkcmds @ 511dc4b

5
Last change on this file since 511dc4b was 715d616, checked in by Sebastian Huber <sebastian.huber@…>, on 06/19/18 at 13:10:36

bsps: Support .rtemsstack.* linker input sections

Use a dedicated memory region or place it between the BSS and workspace.

Update #3459.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*
2 * This file contains GNU linker directives for the Cogent
3 * CSB360 development board.
4 *
5 * Copyright (C) 2004 Cogent Computer Systems
6 * Author: Jay Monkman <jtm@lopingdog.com>
7 */
8
9/*
10 * Declare size of heap.
11 * A heap size of 0 means "Use all available memory for the heap".
12 * Initial stack located in on-chip SRAM and not declared there.
13 */
14HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
15RamBase = DEFINED(RamBase) ? RamBase : 0x00100000;
16RamSize = DEFINED(RamSize) ? RamSize : 31M;
17
18/* This is needed for _CPU_ISR_install_vector -
19*  WARNING: it MUST match BSP_RAMBAR !!!!!!!!!!! */
20_VBR = 0x20000000;
21
22ENTRY(start)
23STARTUP(start.o)
24
25/*
26 * Setup the memory map of the CSB360 board
27 *
28 * The "ram" section is placed in RAM after the space used by umon.
29 *
30 */
31MEMORY
32{
33  ram     : ORIGIN = 0x00100000, LENGTH = 31M
34}
35
36SECTIONS
37{
38     
39  /*
40   * Text, data and bss segments
41   */
42   .text :
43   {
44        RamBase = .;
45        RamBase = .;
46        CREATE_OBJECT_SYMBOLS
47        *(.text*)
48
49        /*
50         * C++ constructors/destructors
51         */
52        *(.gnu.linkonce.t.*)
53
54        /*
55         * Initialization and finalization code.
56         */
57        . = ALIGN (16);
58        PROVIDE (_init = .);
59        *crti.o(.init)
60        *(.init)
61        *crtn.o(.init)
62        . = ALIGN (16);
63        PROVIDE (_fini = .);
64        *crti.o(.fini)
65        *(.fini)
66        *crtn.o(.fini)
67
68        /*
69         * Special FreeBSD sysctl sections.
70         */
71        . = ALIGN (16);
72        __start_set_sysctl_set = .;
73        *(set_sysctl_*);
74        __stop_set_sysctl_set = ABSOLUTE(.);
75        *(set_domain_*);
76        *(set_pseudo_*);
77
78        /*
79         * C++ constructors/destructors
80         */
81        . = ALIGN (16);
82        *crtbegin.o(.ctors)
83        *(.ctors)
84        *crtend.o(.ctors)
85        *crtbegin.o(.dtors)
86        *(.dtors)
87        *crtend.o(.dtors)
88
89        /*
90         * Exception frame info
91         */
92        . = ALIGN (16);
93        *(.eh_frame)
94
95        /*
96         * Read-only data
97         */
98        . = ALIGN (16);
99        _rodata_start = .;
100        *(.rodata*)
101        KEEP (*(SORT(.rtemsroset.*)))
102        *(.gnu.linkonce.r*)
103
104        . = ALIGN (16);
105        PROVIDE (etext = .);
106
107   } > ram
108
109   .tdata : {
110        _TLS_Data_begin = .;
111        *(.tdata .tdata.* .gnu.linkonce.td.*)
112        _TLS_Data_end = .;
113   } >ram
114
115   .tbss : {
116        _TLS_BSS_begin = .;
117        *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
118        _TLS_BSS_end = .;
119   } >ram
120
121   _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
122   _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
123   _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
124   _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
125   _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
126   _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
127
128
129   .data :
130   {
131        copy_start = .;
132        *(.shdata)
133        . = ALIGN (0x10);
134        *(.data*)
135        KEEP (*(SORT(.rtemsrwset.*)))
136        . = ALIGN (0x10);
137        *(.gcc_exc)
138        *(.gcc_except_table*)
139        *(.jcr)
140        . = ALIGN (0x10);
141        *(.gnu.linkonce.d*)
142        . = ALIGN (0x10);
143        _edata = .;
144         copy_end = .;
145   } > ram
146
147  .bss :
148  {
149        clear_start = . ;
150        *(.shbss)
151        *(.dynbss)
152        *(.bss* .gnu.linkonce.b.*)
153        *(COMMON)
154        . = ALIGN(0x10);
155        _end = .;
156   
157        clear_end = .;
158  } > ram
159
160  .rtemsstack (NOLOAD) : {
161        *(SORT(.rtemsstack.*))
162        WorkAreaBase = .;
163  } >ram
164
165  .stab 0 (NOLOAD) :
166  {
167    *(.stab)
168  }
169
170  .stabstr 0 (NOLOAD) :
171  {
172    *(.stabstr)
173  }
174 
175}
Note: See TracBrowser for help on using the repository browser.