source: rtems/bsps/m68k/gen68360/start/linkcmds.prom @ 9964895

5
Last change on this file since 9964895 was 9964895, checked in by Sebastian Huber <sebastian.huber@…>, on 04/20/18 at 08:35:35

bsps: Move startup files to bsps

Adjust build support files to new directory layout.

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 3.7 KB
Line 
1/*
2 * This file contains GNU linker directives for a generic MC68360 board.
3 * Variations in memory size and allocation can be made by
4 * overriding some values with linker command-line arguments.
5 *
6 * These linker directives are for producing a PROM version.
7 * The data segment is placed at the end of the text segment in the PROM.
8 * The start-up code takes care of copying this region to RAM.
9 *
10 * Saskatchewan Accelerator Laboratory
11 * University of Saskatchewan
12 * Saskatoon, Saskatchewan, CANADA
13 * eric@skatter.usask.ca
14 */
15
16/*
17 * Declare some sizes.
18 * A heap size of 0 means `use all available memory for the heap'.
19 */
20RamBase = DEFINED(RamBase) ? RamBase : 0x0;
21RamSize = DEFINED(RamSize) ? RamSize : 64M;
22HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
23_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
24
25/*
26 * Declare on-board memory.
27 */
28MEMORY {
29          ram : ORIGIN = 0x00000000, LENGTH = 64M
30          rom : ORIGIN = 0x0F000000, LENGTH = 1M
31        dpram : ORIGIN = 0x0E000000, LENGTH = 8k
32}
33
34/*
35 * Load objects
36 */
37SECTIONS {
38        /*
39         * Boot PROM
40         */
41        rom : {
42                _RomBase = .;
43        } >rom
44
45        /*
46         * Dynamic RAM
47         */
48        ram : {
49                RamBase = .;
50        } >ram
51
52        /*
53         * Text, data and bss segments
54         */
55        .text : AT(0x0) {
56                *(.text*)
57
58                /*
59                 * C++ constructors/destructors
60                 */
61                *(.gnu.linkonce.t.*)
62
63                /*
64                 * Initialization and finalization code.
65                 */
66                PROVIDE (_init = .);
67                *crti.o(.init)
68                *(.init)
69                *crtn.o(.init)
70                PROVIDE (_fini = .);
71                *crti.o(.fini)
72                *(.fini)
73                *crtn.o(.fini)
74
75                /*
76                 * Special FreeBSD sysctl sections.
77                 */
78                . = ALIGN (16);
79                __start_set_sysctl_set = .;
80                *(set_sysctl_*);
81                __stop_set_sysctl_set = ABSOLUTE(.);
82                *(set_domain_*);
83                *(set_pseudo_*);
84
85                /*
86                 * C++ constructors/destructors
87                 */
88                . = ALIGN (16);
89                *crtbegin.o(.ctors)
90                *(.ctors)
91                *crtend.o(.ctors)
92                *crtbegin.o(.dtors)
93                *(.dtors)
94                *crtend.o(.dtors)
95
96                /*
97                 * Exception frame info
98                 */
99                . = ALIGN (16);
100                *(.eh_frame)
101
102                /*
103                 * Read-only data
104                 */
105                . = ALIGN (16);
106                _rodata_start = . ;
107                *(.rodata*)
108                KEEP (*(SORT(.rtemsroset.*)))
109                *(.gnu.linkonce.r*)
110
111                 . = ALIGN (16);
112                PROVIDE (etext = .);
113        } >rom
114
115        .tdata : {
116                _TLS_Data_begin = .;
117                *(.tdata .tdata.* .gnu.linkonce.td.*)
118                _TLS_Data_end = .;
119        } >rom
120
121        .tbss : {
122                _TLS_BSS_begin = .;
123                *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
124                _TLS_BSS_end = .;
125        } >rom
126
127        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
128        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
129        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
130        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
131        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
132        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
133
134        .data : AT(SIZEOF(.text)) {
135                _copy_start = .;
136                *(.data)
137                KEEP (*(SORT(.rtemsrwset.*)))
138                *(.gnu.linkonce.d*)
139                *(.jcr)
140                *(.gcc_except_table*)
141                . = ALIGN (16);
142                PROVIDE (edata = .);
143                _copy_end = .;
144        } >ram
145        .bss : {
146                M68Kvec = .;
147                . += (256 * 4);
148                *(.dynbss)
149                *(.bss* .gnu.linkonce.b.*)
150                *(COMMON)
151                . = ALIGN (16);
152                PROVIDE (end = .);
153
154                . += _StackSize;
155                . = ALIGN (16);
156                _stack_init = .;
157                _clear_end = .;
158
159                WorkAreaBase = .;
160        } >ram
161
162        /*
163         * On-chip memory/peripherals
164         */
165        dpram : {
166                m360 = .;
167                . += (8 * 1024);
168        } >dpram
169}
Note: See TracBrowser for help on using the repository browser.