source: rtems/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp @ 9c1133e

4.104.114.84.95
Last change on this file since 9c1133e was 9c1133e, checked in by Joel Sherrill <joel.sherrill@…>, on 01/20/03 at 19:57:14

mkChangeLogList [-n]

  • Property mode set to 100644
File size: 3.1 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 *  $Id$
16 */
17
18/*
19 * Declare some sizes.
20 * A heap size of 0 means `use all available memory for the heap'.
21 */
22_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
23_RamSize = DEFINED(_RamSize) ? _RamSize : 64M;
24_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
25_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
26
27/*
28 * Declare on-board memory.
29 */
30MEMORY {
31          ram : ORIGIN = 0x00000000, LENGTH = 64M
32        myram : ORIGIN = 16M-400k,   LENGTH = 400k
33          rom : ORIGIN = 0x0F000000, LENGTH = 1M
34        dpram : ORIGIN = 0x0E000000, LENGTH = 8k
35}
36
37/*
38 * Load objects
39 */
40SECTIONS {
41        /*
42         * Boot PROM
43         */
44        rom : {
45                _RomBase = .;
46        } >rom
47
48        /*
49         * Dynamic RAM
50         */
51        ram : {
52                _RamBase = .;
53        } >ram
54
55        /*
56         * Text, data and bss segments
57         */
58        .text : AT(0x0) {
59                *(.text)
60
61                /*
62                 * C++ constructors/destructors
63                 */
64                *(.gnu.linkonce.t.*)
65
66                /*
67                 * Initialization and finalization code.
68                 */
69                PROVIDE (_init = .);
70                *crti.o(.init)
71                *(.init)
72                *crtn.o(.init)
73                PROVIDE (_fini = .);
74                *crti.o(.fini)
75                *(.fini)
76                *crtn.o(.fini)
77
78                /*
79                 * Special FreeBSD sysctl sections.
80                 */
81                . = ALIGN (16);
82                __start_set_sysctl_set = .;
83                *(set_sysctl_*);
84                __stop_set_sysctl_set = ABSOLUTE(.);
85                *(set_domain_*);
86                *(set_pseudo_*);
87
88                /*
89                 * C++ constructors/destructors
90                 */
91                . = ALIGN (16);
92                *crtbegin.o(.ctors)
93                *(.ctors)
94                *crtend.o(.ctors)
95                *crtbegin.o(.dtors)
96                *(.dtors)
97                *crtend.o(.dtors)
98
99                /*
100                 * Exception frame info
101                 */
102                . = ALIGN (16);
103                *(.eh_frame)
104
105                /*
106                 * Read-only data
107                 */
108                . = ALIGN (16);
109                _rodata_start = . ;
110                *(.rodata*)
111                *(.gnu.linkonce.r*)
112
113                 . = ALIGN (16);
114                PROVIDE (etext = .);
115        } >rom
116        .data : AT(SIZEOF(.text)) {
117                _copy_start = .;
118                *(.data)
119                *(.gnu.linkonce.d*)
120                *(.jcr)
121                *(.gcc_except_table)
122                . = ALIGN (16);
123                PROVIDE (edata = .);
124                _copy_end = .;
125        } >myram
126        .bss : {
127                M68Kvec = .;
128                . += (256 * 4);
129                _clear_start = .;
130                *(.bss)
131                *(COMMON)
132                . = ALIGN (16);
133                PROVIDE (end = .);
134
135                . += _StackSize;
136                . = ALIGN (16);
137                _stack_init = .;
138                _clear_end = .;
139
140                _WorkspaceBase = .;
141        } >myram
142
143        /*
144         * On-chip memory/peripherals
145         */
146        dpram : {
147                m360 = .;
148                . += (8 * 1024);
149        } >dpram
150}
Note: See TracBrowser for help on using the repository browser.