source: rtems/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom @ 5890919

4.104.114.84.95
Last change on this file since 5890919 was 5890919, checked in by Joel Sherrill <joel.sherrill@…>, on 01/13/00 at 22:11:35

Updated files missed in earlier batch from Eric Norum.

  • Property mode set to 100644
File size: 2.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 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_HeapSize = 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                 * C++ constructors/destructors
77                 */
78                . = ALIGN (16);
79                *crtbegin.o(.ctors)
80                *(.ctors)
81                *crtend.o(.ctors)
82                *crtbegin.o(.dtors)
83                *(.dtors)
84                *crtend.o(.dtors)
85
86                /*
87                 * Exception frame info
88                 */
89                . = ALIGN (16);
90                *(.eh_frame)
91
92                /*
93                 * Read-only data
94                 */
95                . = ALIGN (16);
96                _rodata_start = . ;
97                *(.rodata)
98                *(.gnu.linkonce.r*)
99
100                 . = ALIGN (16);
101                PROVIDE (etext = .);
102        } >rom
103        .data : AT(SIZEOF(.text)) {
104                _copy_start = .;
105                *(.data)
106                *(.gnu.linkonce.d*)
107                *(.gcc_except_table)
108                . = ALIGN (16);
109                PROVIDE (edata = .);
110                _copy_end = .;
111        } >ram
112        .bss : {
113                M68Kvec = .;
114                . += (256 * 4);
115                _clear_start = .;
116                *(.bss)
117                *(COMMON)
118                . = ALIGN (16);
119                PROVIDE (end = .);
120
121                . += _StackSize;
122                . = ALIGN (16);
123                _stack_init = .;
124                _clear_end = .;
125
126                _WorkspaceBase = .;
127        } >ram
128
129        /*
130         * On-chip memory/peripherals
131         */
132        dpram : {
133                m360 = .;
134                . += (8 * 1024);
135        } >dpram
136}
Note: See TracBrowser for help on using the repository browser.