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

4.104.114.84.95
Last change on this file since f331442d was 5f0fdeb, checked in by Joel Sherrill <joel.sherrill@…>, on 11/26/04 at 01:54:22

2004-11-25 Joel Sherrill <joel@…>

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