1 | /* |
---|
2 | * This file contains directives for the GNU linker which are specific |
---|
3 | * to the Motorola MVME147 boards. |
---|
4 | * |
---|
5 | * COPYRIGHT (c) 1989-1999. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may be |
---|
9 | * found in the file LICENSE in this distribution or at |
---|
10 | * http://www.OARcorp.com/rtems/license.html. |
---|
11 | * |
---|
12 | * MVME147 port for TNI - Telecom Bretagne |
---|
13 | * by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr) |
---|
14 | * May 1996 |
---|
15 | * |
---|
16 | * $Id$ |
---|
17 | */ |
---|
18 | |
---|
19 | /* |
---|
20 | * Declare some sizes. |
---|
21 | */ |
---|
22 | HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000; |
---|
23 | StackSize = DEFINED(StackSize) ? StackSize : 0x1000; |
---|
24 | |
---|
25 | MEMORY |
---|
26 | { |
---|
27 | ram : org = 0x0, l = 0x400000 |
---|
28 | } |
---|
29 | |
---|
30 | SECTIONS |
---|
31 | { |
---|
32 | ram : { |
---|
33 | . = 0x7000; |
---|
34 | } >ram |
---|
35 | |
---|
36 | /* |
---|
37 | * Text, data and bss segments |
---|
38 | */ |
---|
39 | .text : { |
---|
40 | *(.text) |
---|
41 | |
---|
42 | /* |
---|
43 | * C++ constructors/destructors |
---|
44 | */ |
---|
45 | *(.gnu.linkonce.t.*) |
---|
46 | |
---|
47 | /* |
---|
48 | * Initialization and finalization code. |
---|
49 | * |
---|
50 | * Various files can provide initialization and finalization |
---|
51 | * functions. crtbegin.o and crtend.o are two instances. The |
---|
52 | * body of these functions are in .init and .fini sections. We |
---|
53 | * accumulate the bodies here, and prepend function prologues |
---|
54 | * from crti.o and function epilogues from crtn.o. crti.o must |
---|
55 | * be linked first; crtn.o must be linked last. Because these |
---|
56 | * are wildcards, it doesn't matter if the user does not |
---|
57 | * actually link against crti.o and crtn.o; the linker won't |
---|
58 | * look for a file to match a wildcard. The wildcard also |
---|
59 | * means that it doesn't matter which directory crti.o and |
---|
60 | * crtn.o are in. |
---|
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) |
---|
70 | |
---|
71 | /* |
---|
72 | * C++ constructors/destructors |
---|
73 | * |
---|
74 | * gcc uses crtbegin.o to find the start of the constructors |
---|
75 | * and destructors so we make sure it is first. Because this |
---|
76 | * is a wildcard, it doesn't matter if the user does not |
---|
77 | * actually link against crtbegin.o; the linker won't look for |
---|
78 | * a file to match a wildcard. The wildcard also means that |
---|
79 | * it doesn't matter which directory crtbegin.o is in. The |
---|
80 | * constructor and destructor list are terminated in |
---|
81 | * crtend.o. The same comments apply to it. |
---|
82 | */ |
---|
83 | . = ALIGN (16); |
---|
84 | *crtbegin.o(.ctors) |
---|
85 | *(.ctors) |
---|
86 | *crtend.o(.ctors) |
---|
87 | *crtbegin.o(.dtors) |
---|
88 | *(.dtors) |
---|
89 | *crtend.o(.dtors) |
---|
90 | |
---|
91 | /* |
---|
92 | * Exception frame info |
---|
93 | */ |
---|
94 | . = ALIGN (16); |
---|
95 | *(.eh_frame) |
---|
96 | |
---|
97 | /* |
---|
98 | * Read-only data |
---|
99 | */ |
---|
100 | . = ALIGN (16); |
---|
101 | _rodata_start = . ; |
---|
102 | *(.rodata) |
---|
103 | *(.gnu.linkonce.r*) |
---|
104 | |
---|
105 | . = ALIGN (16); |
---|
106 | PROVIDE (_etext = .); |
---|
107 | } >ram |
---|
108 | .data : { |
---|
109 | PROVIDE (_copy_start = .); |
---|
110 | *(.data) |
---|
111 | *(.gnu.linkonce.d*) |
---|
112 | *(.gcc_except_table) |
---|
113 | . = ALIGN (16); |
---|
114 | PROVIDE (_edata = .); |
---|
115 | PROVIDE (_copy_end = .); |
---|
116 | } >ram |
---|
117 | .bss : { |
---|
118 | PROVIDE (_bss_start = .); |
---|
119 | PROVIDE (_clear_start = .); |
---|
120 | *(.bss) |
---|
121 | *(COMMON) |
---|
122 | . = ALIGN (16); |
---|
123 | PROVIDE (end = .); |
---|
124 | |
---|
125 | . += StackSize; |
---|
126 | PROVIDE (_stack_init = .); |
---|
127 | |
---|
128 | . = ALIGN (16); |
---|
129 | PROVIDE (_HeapStart = .); |
---|
130 | . += HeapSize; |
---|
131 | PROVIDE (_HeapEnd = .); |
---|
132 | |
---|
133 | clear_end = .; |
---|
134 | |
---|
135 | PROVIDE (_WorkspaceBase = .); |
---|
136 | } >ram |
---|
137 | } |
---|