source: rtems/bsps/m68k/gen68360/start/linkcmds.bootp @ 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.8 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 bootstrap 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        myram : ORIGIN = 16M-400k,   LENGTH = 400k
31          rom : ORIGIN = 0x0F000000, LENGTH = 1M
32        dpram : ORIGIN = 0x0E000000, LENGTH = 8k
33}
34
35/*
36 * Load objects
37 */
38SECTIONS {
39        /*
40         * Boot PROM
41         */
42        rom : {
43                _RomBase = .;
44        } >rom
45
46        /*
47         * Dynamic RAM
48         */
49        ram : {
50                RamBase = .;
51        } >ram
52
53        /*
54         * Text, data and bss segments
55         */
56        .text : AT(0x0) {
57                *(.text*)
58
59                /*
60                 * C++ constructors/destructors
61                 */
62                *(.gnu.linkonce.t.*)
63
64                /*
65                 * Initialization and finalization code.
66                 */
67                PROVIDE (_init = .);
68                *crti.o(.init)
69                *(.init)
70                *crtn.o(.init)
71                PROVIDE (_fini = .);
72                *crti.o(.fini)
73                *(.fini)
74                *crtn.o(.fini)
75
76                /*
77                 * Special FreeBSD sysctl sections.
78                 */
79                . = ALIGN (16);
80                __start_set_sysctl_set = .;
81                *(set_sysctl_*);
82                __stop_set_sysctl_set = ABSOLUTE(.);
83                *(set_domain_*);
84                *(set_pseudo_*);
85
86                /*
87                 * C++ constructors/destructors
88                 */
89                . = ALIGN (16);
90                *crtbegin.o(.ctors)
91                *(.ctors)
92                *crtend.o(.ctors)
93                *crtbegin.o(.dtors)
94                *(.dtors)
95                *crtend.o(.dtors)
96
97                /*
98                 * Exception frame info
99                 */
100                . = ALIGN (16);
101                *(.eh_frame)
102
103                /*
104                 * Read-only data
105                 */
106                . = ALIGN (16);
107                _rodata_start = . ;
108                *(.rodata*)
109                KEEP (*(SORT(.rtemsroset.*)))
110                *(.gnu.linkonce.r*)
111
112                 . = ALIGN (16);
113                PROVIDE (etext = .);
114        } >rom
115
116        .tdata : {
117                _TLS_Data_begin = .;
118                *(.tdata .tdata.* .gnu.linkonce.td.*)
119                _TLS_Data_end = .;
120        } >rom
121
122        .tbss : {
123                _TLS_BSS_begin = .;
124                *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
125                _TLS_BSS_end = .;
126        } >rom
127
128        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
129        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
130        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
131        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
132        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
133        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
134
135        .data : AT(SIZEOF(.text)) {
136                _copy_start = .;
137                *(.data)
138                KEEP (*(SORT(.rtemsrwset.*)))
139                *(.gnu.linkonce.d*)
140                *(.jcr)
141                *(.gcc_except_table*)
142                . = ALIGN (16);
143                PROVIDE (edata = .);
144                _copy_end = .;
145        } >myram
146        .bss : {
147                M68Kvec = .;
148                . += (256 * 4);
149                _clear_start = .;
150                *(.dynbss)
151                *(.bss* .gnu.linkonce.b.*)
152                *(COMMON)
153                . = ALIGN (16);
154                PROVIDE (end = .);
155
156                . += _StackSize;
157                . = ALIGN (16);
158                _stack_init = .;
159                _clear_end = .;
160
161                WorkAreaBase = .;
162        } >myram
163
164        /*
165         * On-chip memory/peripherals
166         */
167        dpram : {
168                m360 = .;
169                . += (8 * 1024);
170        } >dpram
171}
Note: See TracBrowser for help on using the repository browser.