1 | OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", |
---|
2 | "elf32-powerpc") |
---|
3 | |
---|
4 | OUTPUT_ARCH(powerpc) |
---|
5 | ENTRY(_start) |
---|
6 | |
---|
7 | /* |
---|
8 | * Number of Decrementer countdowns per millisecond |
---|
9 | * |
---|
10 | * Calculated by: (66 Mhz * 1000) / 4 cycles per click |
---|
11 | */ |
---|
12 | |
---|
13 | PROVIDE(CPU_PPC_CLICKS_PER_MS = 16500); |
---|
14 | |
---|
15 | RamBase = DEFINED(RamBase) ? RamBase : 0x0; |
---|
16 | RamSize = DEFINED(RamSize) ? RamSize : 31M; |
---|
17 | |
---|
18 | MEMORY |
---|
19 | { |
---|
20 | VECTORS : ORIGIN = 0, LENGTH = 64K |
---|
21 | RAM : ORIGIN = 1M, LENGTH = 31M |
---|
22 | EPROM : ORIGIN = 0xFFF00000, LENGTH = 0x80000 |
---|
23 | } |
---|
24 | |
---|
25 | SECTIONS |
---|
26 | { |
---|
27 | .vectors 0x00100 : |
---|
28 | { |
---|
29 | *(.vectors) |
---|
30 | } |
---|
31 | |
---|
32 | /* Read-only sections, merged into text segment: */ |
---|
33 | /* SDS ROM worked at 0x30000 */ |
---|
34 | .interp : { *(.interp) } |
---|
35 | .hash : { *(.hash) } |
---|
36 | .dynsym : { *(.dynsym) } |
---|
37 | .dynstr : { *(.dynstr) } |
---|
38 | |
---|
39 | .rel.dyn : |
---|
40 | { |
---|
41 | *(.rel.init) |
---|
42 | *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) |
---|
43 | *(.rel.fini) |
---|
44 | *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) |
---|
45 | *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) |
---|
46 | *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) |
---|
47 | *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) |
---|
48 | *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) |
---|
49 | *(.rel.ctors) |
---|
50 | *(.rel.dtors) |
---|
51 | *(.rel.got) |
---|
52 | *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) |
---|
53 | *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) |
---|
54 | *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) |
---|
55 | *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) |
---|
56 | *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) |
---|
57 | } >RAM |
---|
58 | .rela.dyn : |
---|
59 | { |
---|
60 | *(.rela.init) |
---|
61 | *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) |
---|
62 | *(.rela.fini) |
---|
63 | *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) |
---|
64 | *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) |
---|
65 | *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) |
---|
66 | *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) |
---|
67 | *(.rela.ctors) |
---|
68 | *(.rela.dtors) |
---|
69 | *(.rela.got) |
---|
70 | *(.rela.got1) |
---|
71 | *(.rela.got2) |
---|
72 | *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) |
---|
73 | *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) |
---|
74 | *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) |
---|
75 | *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) |
---|
76 | *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) |
---|
77 | } >RAM |
---|
78 | .rel.plt : { *(.rel.plt) } |
---|
79 | .rela.plt : { *(.rela.plt) } |
---|
80 | |
---|
81 | .plt : { *(.plt) } |
---|
82 | .text 0x100000: |
---|
83 | { |
---|
84 | |
---|
85 | *(.text*) |
---|
86 | *(.gnu.linkonce.t.*) |
---|
87 | *(.descriptors) |
---|
88 | |
---|
89 | /* |
---|
90 | * Special FreeBSD sysctl sections. |
---|
91 | */ |
---|
92 | . = ALIGN (16); |
---|
93 | __start_set_sysctl_set = .; |
---|
94 | *(set_sysctl_*); |
---|
95 | __stop_set_sysctl_set = ABSOLUTE(.); |
---|
96 | *(set_domain_*); |
---|
97 | *(set_pseudo_*); |
---|
98 | |
---|
99 | /* .gnu.warning sections are handled specially by elf32.em. */ |
---|
100 | *(.gnu.warning) |
---|
101 | } >RAM |
---|
102 | .init : { _init = .; __init = .; *(.init) } >RAM |
---|
103 | .fini : { _fini = .; __fini = .; *(.fini) } >RAM |
---|
104 | .rodata : { *(.rodata*) *(.gnu.linkonce.r*) } >RAM |
---|
105 | .rodata1 : { *(.rodata1) } >RAM |
---|
106 | .eh_frame : { *.(eh_frame) } >RAM |
---|
107 | _etext = .; |
---|
108 | PROVIDE (_etext = .); |
---|
109 | PROVIDE (__SDATA2_START__ = .); |
---|
110 | .sdata2 : { *(.sdata2) *(.gnu.linkonce.s2.*) } >RAM |
---|
111 | .sbss2 : { *(.sbss2) *(.gnu.linkonce.sb2.*) } >RAM |
---|
112 | PROVIDE (__SBSS2_END__ = .); |
---|
113 | /* Adjust the address for the data segment. We want to adjust up to |
---|
114 | the same address within the page on the next page up. It would |
---|
115 | be more correct to do this: |
---|
116 | . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1)); |
---|
117 | The current expression does not correctly handle the case of a |
---|
118 | text segment ending precisely at the end of a page; it causes the |
---|
119 | data segment to skip a page. The above expression does not have |
---|
120 | this problem, but it will currently (2/95) cause BFD to allocate |
---|
121 | a single segment, combining both text and data, for this case. |
---|
122 | This will prevent the text segment from being shared among |
---|
123 | multiple executions of the program; I think that is more |
---|
124 | important than losing a page of the virtual address space (note |
---|
125 | that no actual memory is lost; the page which is skipped can not |
---|
126 | be referenced). */ |
---|
127 | . = ALIGN(8) + 0x40000; |
---|
128 | PROVIDE (sdata = .); |
---|
129 | .data : |
---|
130 | { |
---|
131 | *(.data) |
---|
132 | *(.data.*) |
---|
133 | *(.gnu.linkonce.d.*) |
---|
134 | CONSTRUCTORS |
---|
135 | } >RAM |
---|
136 | PROVIDE (__EXCEPT_START__ = .); |
---|
137 | .gcc_except_table : { *(.gcc_except_table*) } >RAM |
---|
138 | PROVIDE (__EXCEPT_END__ = .); |
---|
139 | |
---|
140 | .data1 : { *(.data1) } >RAM |
---|
141 | .got1 : { *(.got1) } >RAM |
---|
142 | .dynamic : { *(.dynamic) } >RAM |
---|
143 | /* Put .ctors and .dtors next to the .got2 section, so that the pointers |
---|
144 | get relocated with -mrelocatable. Also put in the .fixup pointers. |
---|
145 | The current compiler no longer needs this, but keep it around for 2.7.2 */ |
---|
146 | PROVIDE (_GOT2_START_ = .); |
---|
147 | .got2 : { *(.got2) } >RAM |
---|
148 | PROVIDE (__GOT2_END__ = .); |
---|
149 | PROVIDE (__CTOR_LIST__ = .); |
---|
150 | .ctors : { *(.ctors) } >RAM |
---|
151 | PROVIDE (__CTOR_END__ = .); |
---|
152 | PROVIDE (__DTOR_LIST__ = .); |
---|
153 | .dtors : { *(.dtors) } >RAM |
---|
154 | PROVIDE (__DTOR_END__ = .); |
---|
155 | PROVIDE (_FIXUP_START_ = .); |
---|
156 | .fixup : { *(.fixup) } >RAM |
---|
157 | PROVIDE (_FIXUP_END_ = .); |
---|
158 | PROVIDE (__FIXUP_END__ = .); |
---|
159 | PROVIDE (_GOT2_END_ = .); |
---|
160 | .got : { |
---|
161 | PROVIDE (_GOT_START_ = .); |
---|
162 | s.got = .; |
---|
163 | *(.got) |
---|
164 | } >RAM |
---|
165 | .got.plt : { *(.got.plt) } >RAM |
---|
166 | PROVIDE (_GOT_END_ = .); |
---|
167 | PROVIDE (__GOT_END__ = .); |
---|
168 | /* We want the small data sections together, so single-instruction offsets |
---|
169 | can access them all, and initialized data all before uninitialized, so |
---|
170 | we can shorten the on-disk segment size. */ |
---|
171 | PROVIDE (__SDATA_START__ = .); |
---|
172 | .sdata : { |
---|
173 | *(.sdata*) |
---|
174 | *(.gnu.linkonce.s.*) |
---|
175 | _edata = .; |
---|
176 | } >RAM |
---|
177 | PROVIDE (_edata = .); |
---|
178 | PROVIDE (RAM_END = ADDR(.text) + 10M); |
---|
179 | . = ALIGN(8) + 0x1000; |
---|
180 | .sbss : |
---|
181 | { |
---|
182 | PROVIDE (__sbss_start = .); |
---|
183 | *(.sbss*) |
---|
184 | *(.scommon) |
---|
185 | *(.gnu.linkonce.sb.*) |
---|
186 | PROVIDE (__sbss_end = .); |
---|
187 | } >RAM |
---|
188 | .bss : |
---|
189 | { |
---|
190 | PROVIDE (__bss_start = .); |
---|
191 | *(.dynbss) |
---|
192 | *(.bss .bss* .gnu.linkonce.b*) |
---|
193 | *(COMMON) |
---|
194 | } >RAM |
---|
195 | . = ALIGN(16) + 0x8000; |
---|
196 | PROVIDE (__stack = .); |
---|
197 | __rtems_end = . ; |
---|
198 | . = ALIGN(8) + 0x8000; |
---|
199 | PROVIDE(_end = .); |
---|
200 | PROVIDE(end = .); |
---|
201 | |
---|
202 | /* These are needed for ELF backends which have not yet been |
---|
203 | converted to the new style linker. */ |
---|
204 | .stab 0 : { *(.stab) } >RAM |
---|
205 | .stabstr 0 : { *(.stabstr) } |
---|
206 | /* DWARF debug sections. |
---|
207 | Symbols in the DWARF debugging sections are relative to the beginning |
---|
208 | of the section so we begin them at 0. */ |
---|
209 | /* DWARF 1 */ |
---|
210 | .debug 0 : { *(.debug) } |
---|
211 | .line 0 : { *(.line) } |
---|
212 | /* GNU DWARF 1 extensions */ |
---|
213 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
214 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
215 | /* DWARF 1.1 and DWARF 2 */ |
---|
216 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
217 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
218 | /* DWARF 2 */ |
---|
219 | .debug_info 0 : { *(.debug_info) } |
---|
220 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
221 | .debug_line 0 : { *(.debug_line) } |
---|
222 | .debug_frame 0 : { *(.debug_frame) } |
---|
223 | .debug_str 0 : { *(.debug_str) } |
---|
224 | .debug_loc 0 : { *(.debug_loc) } |
---|
225 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
226 | /* SGI/MIPS DWARF 2 extensions */ |
---|
227 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
228 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
229 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
230 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
231 | /* These must appear regardless of . */ |
---|
232 | } |
---|