1 | /* |
---|
2 | * This file contains directives for the GNU linker which are specific |
---|
3 | * to the Ethernet-Comm Board |
---|
4 | * |
---|
5 | * $Id$ |
---|
6 | */ |
---|
7 | |
---|
8 | OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", |
---|
9 | "elf32-powerpc") |
---|
10 | OUTPUT_ARCH(powerpc) |
---|
11 | SEARCH_DIR(/usr/local/powerpc-rtems/lib); |
---|
12 | |
---|
13 | ENTRY(start) |
---|
14 | |
---|
15 | MEMORY |
---|
16 | { |
---|
17 | ram : org = 0x0, l = 4M |
---|
18 | dpram : org = 0xff000000, l = 16K |
---|
19 | canbus : org = 0xff100000, l = 12K |
---|
20 | flash : org = 0xfff00000, l = 512K |
---|
21 | } |
---|
22 | |
---|
23 | |
---|
24 | SECTIONS |
---|
25 | { |
---|
26 | .vectors : |
---|
27 | { |
---|
28 | *(.vectors) |
---|
29 | } >ram |
---|
30 | |
---|
31 | /* |
---|
32 | * The stack will live in this area - between the vectors and |
---|
33 | * the text section. |
---|
34 | */ |
---|
35 | |
---|
36 | .text 0x10000: |
---|
37 | { |
---|
38 | text.start = .; |
---|
39 | *(.entry) |
---|
40 | *(.entry2) |
---|
41 | *(.text) |
---|
42 | *(.rodata*) |
---|
43 | *(.eh_frame) |
---|
44 | *(.gnu.linkonce.r*) |
---|
45 | *(.rodata1) |
---|
46 | *(.gnu.linkonce.t.*) |
---|
47 | *(.descriptors) |
---|
48 | /* .gnu.warning sections are handled specially by elf32.em. */ |
---|
49 | *(.gnu.warning) |
---|
50 | *(rom_ver) |
---|
51 | etext = ALIGN(0x10); |
---|
52 | _etext = .; |
---|
53 | |
---|
54 | __CTOR_LIST__ = .; |
---|
55 | LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) |
---|
56 | *(.ctors) |
---|
57 | LONG(0) |
---|
58 | __CTOR_END__ = .; |
---|
59 | |
---|
60 | __DTOR_LIST__ = .; |
---|
61 | LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) |
---|
62 | *(.dtors) |
---|
63 | LONG(0) |
---|
64 | __DTOR_END__ = .; |
---|
65 | |
---|
66 | *(.lit) |
---|
67 | *(.shdata) |
---|
68 | _init = .; *(.init) |
---|
69 | _fini = .; *(.fini) |
---|
70 | _endtext = .; |
---|
71 | text.end = .; |
---|
72 | } > ram |
---|
73 | |
---|
74 | /* R/W Data */ |
---|
75 | .data : |
---|
76 | { |
---|
77 | *(.data) |
---|
78 | *(.data1) |
---|
79 | *(.gnu.linkonce.d.*) |
---|
80 | PROVIDE (__SDATA_START__ = .); |
---|
81 | *(.sdata) |
---|
82 | *(.gnu.linkonce.s.*) |
---|
83 | } > ram |
---|
84 | |
---|
85 | PROVIDE (__EXCEPT_START__ = .); |
---|
86 | .gcc_except_table : { *(.gcc_except_table) } >ram |
---|
87 | PROVIDE (__EXCEPT_END__ = .); |
---|
88 | __GOT_START__ = .; |
---|
89 | .got : |
---|
90 | { |
---|
91 | s.got = .; |
---|
92 | *(.got.plt) *(.got) |
---|
93 | } > ram |
---|
94 | __GOT_END__ = .; |
---|
95 | |
---|
96 | .got1 : { *(.got1) } >ram |
---|
97 | PROVIDE (__GOT2_START__ = .); |
---|
98 | PROVIDE (_GOT2_START_ = .); |
---|
99 | .got2 : { *(.got2) } >ram |
---|
100 | PROVIDE (__GOT2_END__ = .); |
---|
101 | PROVIDE (_GOT2_END_ = .); |
---|
102 | |
---|
103 | PROVIDE (__FIXUP_START__ = .); |
---|
104 | PROVIDE (_FIXUP_START_ = .); |
---|
105 | .fixup : { *(.fixup) } >ram |
---|
106 | PROVIDE (_FIXUP_END_ = .); |
---|
107 | PROVIDE (__FIXUP_END__ = .); |
---|
108 | |
---|
109 | PROVIDE (__SDATA2_START__ = .); |
---|
110 | .sdata2 : { *(.sdata2) *(.gnu.linkonce.s2.*) } >ram |
---|
111 | .sbss2 : { *(.sbss2) *(.gnu.linkonce.sb2.*) } >ram |
---|
112 | PROVIDE (__SBSS2_END__ = .); |
---|
113 | |
---|
114 | .sbss2 : { *(.sbss2) } >ram |
---|
115 | PROVIDE (__SBSS2_END__ = .); |
---|
116 | |
---|
117 | __SBSS_START__ = .; |
---|
118 | .bss : |
---|
119 | { |
---|
120 | bss.start = .; |
---|
121 | *(.bss) *(.sbss) *(COMMON) |
---|
122 | . = ALIGN(4); |
---|
123 | bss.end = .; |
---|
124 | } > ram |
---|
125 | __SBSS_END__ = .; |
---|
126 | |
---|
127 | bss.size = bss.end - bss.start; |
---|
128 | text.size = text.end - text.start; |
---|
129 | PROVIDE(_end = bss.end); |
---|
130 | /* |
---|
131 | * Interrupt stack setup |
---|
132 | */ |
---|
133 | |
---|
134 | IntrStack_start = ALIGN(0x10); |
---|
135 | . += 0x4000; |
---|
136 | intrStack = .; |
---|
137 | PROVIDE(intrStackPtr = intrStack); |
---|
138 | |
---|
139 | dpram : |
---|
140 | { |
---|
141 | m8xx = .; |
---|
142 | _m8xx = .; |
---|
143 | . += (8 * 1024); |
---|
144 | } >dpram |
---|
145 | |
---|
146 | canbus : |
---|
147 | { |
---|
148 | canbus0 = .; |
---|
149 | . += (0x1000); |
---|
150 | canbus1 = .; |
---|
151 | . += (0x1000); |
---|
152 | canbus2 = .; |
---|
153 | . += (0x1000); |
---|
154 | } >canbus |
---|
155 | |
---|
156 | |
---|
157 | /* Stabs debugging sections. */ |
---|
158 | .stab 0 : { *(.stab) } |
---|
159 | .stabstr 0 : { *(.stabstr) } |
---|
160 | .stab.excl 0 : { *(.stab.excl) } |
---|
161 | .stab.exclstr 0 : { *(.stab.exclstr) } |
---|
162 | .stab.index 0 : { *(.stab.index) } |
---|
163 | .stab.indexstr 0 : { *(.stab.indexstr) } |
---|
164 | .comment 0 : { *(.comment) } |
---|
165 | |
---|
166 | /* DWARF debug sections. |
---|
167 | Symbols in the DWARF debugging sections are relative to the beginning |
---|
168 | of the section so we begin them at 0. */ |
---|
169 | /* DWARF 1 */ |
---|
170 | .debug 0 : { *(.debug) } |
---|
171 | .line 0 : { *(.line) } |
---|
172 | |
---|
173 | /* GNU DWARF 1 extensions */ |
---|
174 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
175 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
176 | |
---|
177 | /* DWARF 1.1 and DWARF 2 */ |
---|
178 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
179 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
180 | |
---|
181 | /* DWARF 2 */ |
---|
182 | .debug_info 0 : { *(.debug_info) } |
---|
183 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
184 | .debug_line 0 : { *(.debug_line) } |
---|
185 | .debug_frame 0 : { *(.debug_frame) } |
---|
186 | .debug_str 0 : { *(.debug_str) } |
---|
187 | .debug_loc 0 : { *(.debug_loc) } |
---|
188 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
189 | |
---|
190 | /* SGI/MIPS DWARF 2 extensions */ |
---|
191 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
192 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
193 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
194 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
195 | /* These must appear regardless of . */ |
---|
196 | |
---|
197 | } |
---|