source:
rtems/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds
@
c0ebf02
Last change on this file since c0ebf02 was c0ebf02, checked in by Joel Sherrill <joel.sherrill@…>, on 01/13/00 at 15:06:24 | |
---|---|
|
|
File size: 2.5 KB |
Rev | Line | |
---|---|---|
[c257ec4e] | 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 | * Saskatchewan Accelerator Laboratory | |
7 | * University of Saskatchewan | |
8 | * Saskatoon, Saskatchewan, CANADA | |
9 | * eric@skatter.usask.ca | |
10 | * | |
11 | * $Id$ | |
12 | */ | |
13 | ||
14 | /* | |
15 | * Declare some sizes. | |
[c0ebf02] | 16 | * A heap size of 0 means `use all available memory for the heap'. |
[c257ec4e] | 17 | */ |
[c0ebf02] | 18 | _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0; |
19 | _StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; | |
[c257ec4e] | 20 | |
21 | /* | |
22 | * Declare on-board memory. | |
23 | */ | |
24 | MEMORY { | |
25 | ram : ORIGIN = 0x00000000, LENGTH = 64M | |
26 | rom : ORIGIN = 0x0F000000, LENGTH = 1M | |
27 | dpram : ORIGIN = 0x0E000000, LENGTH = 8k | |
28 | } | |
29 | ||
30 | /* | |
31 | * Load objects | |
32 | */ | |
33 | SECTIONS { | |
34 | /* | |
35 | * Boot PROM | |
36 | */ | |
37 | rom : { | |
38 | _RomBase = .; | |
39 | } >rom | |
40 | ||
41 | /* | |
42 | * Dynamic RAM | |
43 | */ | |
44 | ram : { | |
45 | _RamBase = .; | |
46 | } >ram | |
47 | ||
48 | /* | |
49 | * Text, data and bss segments | |
50 | */ | |
51 | .text : { | |
52 | *(.text) | |
53 | ||
[b2b4835] | 54 | /* |
55 | * C++ constructors/destructors | |
56 | */ | |
[01c36de] | 57 | *(.gnu.linkonce.t.*) |
58 | ||
[b2b4835] | 59 | /* |
60 | * Initialization and finalization code. | |
61 | */ | |
62 | PROVIDE (_init = .); | |
63 | *crti.o(.init) | |
64 | *(.init) | |
65 | *crtn.o(.init) | |
66 | PROVIDE (_fini = .); | |
67 | *crti.o(.fini) | |
68 | *(.fini) | |
69 | *crtn.o(.fini) | |
[f86ec42] | 70 | |
[c257ec4e] | 71 | /* |
[b2b4835] | 72 | * C++ constructors/destructors |
[c257ec4e] | 73 | */ |
[b2b4835] | 74 | . = ALIGN (16); |
75 | *crtbegin.o(.ctors) | |
[c257ec4e] | 76 | *(.ctors) |
[b2b4835] | 77 | *crtend.o(.ctors) |
78 | *crtbegin.o(.dtors) | |
[c257ec4e] | 79 | *(.dtors) |
[b2b4835] | 80 | *crtend.o(.dtors) |
81 | ||
82 | /* | |
83 | * Exception frame info | |
84 | */ | |
85 | . = ALIGN (16); | |
86 | *(.eh_frame) | |
[c257ec4e] | 87 | |
[b2b4835] | 88 | /* |
89 | * Read-only data | |
90 | */ | |
91 | . = ALIGN (16); | |
[01c36de] | 92 | _rodata_start = . ; |
93 | *(.rodata) | |
94 | *(.gnu.linkonce.r*) | |
95 | ||
[0af1b73f] | 96 | . = ALIGN (16); |
[b2b4835] | 97 | PROVIDE (etext = .); |
98 | } >ram | |
[c257ec4e] | 99 | .data : { |
[c0ebf02] | 100 | _copy_start = .; |
[c257ec4e] | 101 | *(.data) |
[01c36de] | 102 | *(.gnu.linkonce.d*) |
103 | *(.gcc_except_table) | |
[c257ec4e] | 104 | . = ALIGN (16); |
[c0ebf02] | 105 | PROVIDE (edata = .); |
106 | _copy_end = .; | |
[c257ec4e] | 107 | } >ram |
108 | .bss : { | |
109 | M68Kvec = .; | |
110 | . += (256 * 4); | |
[c0ebf02] | 111 | _clear_start = .; |
[c257ec4e] | 112 | *(.bss) |
113 | *(COMMON) | |
114 | . = ALIGN (16); | |
[b2b4835] | 115 | PROVIDE (end = .); |
116 | ||
[c0ebf02] | 117 | . += _StackSize; |
[c257ec4e] | 118 | . = ALIGN (16); |
[c0ebf02] | 119 | _stack_init = .; |
120 | _clear_end = .; | |
[c257ec4e] | 121 | |
122 | _WorkspaceBase = .; | |
123 | } >ram | |
124 | ||
125 | /* | |
126 | * On-chip memory/peripherals | |
127 | */ | |
128 | dpram : { | |
129 | m360 = .; | |
130 | . += (8 * 1024); | |
131 | } >dpram | |
132 | } |
Note: See TracBrowser
for help on using the repository browser.