1 |
30 |
unneback |
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.67 Mhz * 1000) / 4 cycles per click
|
11 |
|
|
*/
|
12 |
|
|
|
13 |
|
|
SECTIONS
|
14 |
|
|
{
|
15 |
|
|
.vectors 0x00100 :
|
16 |
|
|
{
|
17 |
|
|
*(.vectors)
|
18 |
|
|
}
|
19 |
|
|
|
20 |
|
|
/* Read-only sections, merged into text segment: */
|
21 |
|
|
/* SDS ROM worked at 0x30000 */
|
22 |
|
|
. = 0x30000;
|
23 |
|
|
.interp : { *(.interp) }
|
24 |
|
|
.hash : { *(.hash) }
|
25 |
|
|
.dynsym : { *(.dynsym) }
|
26 |
|
|
.dynstr : { *(.dynstr) }
|
27 |
|
|
.rela.text : { *(.rela.text) }
|
28 |
|
|
.rela.data : { *(.rela.data) }
|
29 |
|
|
.rela.rodata : { *(.rela.rodata) }
|
30 |
|
|
.rela.got : { *(.rela.got) }
|
31 |
|
|
.rela.got1 : { *(.rela.got1) }
|
32 |
|
|
.rela.got2 : { *(.rela.got2) }
|
33 |
|
|
.rela.ctors : { *(.rela.ctors) }
|
34 |
|
|
.rela.dtors : { *(.rela.dtors) }
|
35 |
|
|
.rela.init : { *(.rela.init) }
|
36 |
|
|
.rela.fini : { *(.rela.fini) }
|
37 |
|
|
.rela.bss : { *(.rela.bss) }
|
38 |
|
|
.rela.plt : { *(.rela.plt) }
|
39 |
|
|
.rela.sdata : { *(.rela.sdata2) }
|
40 |
|
|
.rela.sbss : { *(.rela.sbss2) }
|
41 |
|
|
.rela.sdata2 : { *(.rela.sdata2) }
|
42 |
|
|
.rela.sbss2 : { *(.rela.sbss2) }
|
43 |
|
|
.plt : { *(.plt) }
|
44 |
|
|
.text :
|
45 |
|
|
{
|
46 |
|
|
*(.text)
|
47 |
|
|
*(.gnu.linkonce.t.*)
|
48 |
|
|
*(.descriptors)
|
49 |
|
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
50 |
|
|
*(.gnu.warning)
|
51 |
|
|
} =0
|
52 |
|
|
.init : { *(.init) } =0
|
53 |
|
|
.fini : { *(.fini) } =0
|
54 |
|
|
.rodata : { *(.rodata) *(.gnu.linkonce.r*) }
|
55 |
|
|
.rodata1 : { *(.rodata1) }
|
56 |
|
|
_etext = .;
|
57 |
|
|
PROVIDE (etext = .);
|
58 |
|
|
PROVIDE (__SDATA2_START__ = .);
|
59 |
|
|
.sdata2 : { *(.sdata2) }
|
60 |
|
|
PROVIDE (__SBSS2_START__ = .);
|
61 |
|
|
.sbss2 : { *(.sbss2) }
|
62 |
|
|
PROVIDE (__SBSS2_END__ = .);
|
63 |
|
|
/* Adjust the address for the data segment. We want to adjust up to
|
64 |
|
|
the same address within the page on the next page up. It would
|
65 |
|
|
be more correct to do this:
|
66 |
|
|
. = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
|
67 |
|
|
The current expression does not correctly handle the case of a
|
68 |
|
|
text segment ending precisely at the end of a page; it causes the
|
69 |
|
|
data segment to skip a page. The above expression does not have
|
70 |
|
|
this problem, but it will currently (2/95) cause BFD to allocate
|
71 |
|
|
a single segment, combining both text and data, for this case.
|
72 |
|
|
This will prevent the text segment from being shared among
|
73 |
|
|
multiple executions of the program; I think that is more
|
74 |
|
|
important than losing a page of the virtual address space (note
|
75 |
|
|
that no actual memory is lost; the page which is skipped can not
|
76 |
|
|
be referenced). */
|
77 |
|
|
. = ALIGN(8) + 0x40000;
|
78 |
|
|
PROVIDE (sdata = .);
|
79 |
|
|
.data :
|
80 |
|
|
{
|
81 |
|
|
*(.data)
|
82 |
|
|
*(.gnu.linkonce.d.*)
|
83 |
|
|
CONSTRUCTORS
|
84 |
|
|
}
|
85 |
|
|
PROVIDE (__EXCEPT_START__ = .);
|
86 |
|
|
.gcc_except_table : { *(.gcc_except_table) }
|
87 |
|
|
PROVIDE (__EXCEPT_END__ = .);
|
88 |
|
|
|
89 |
|
|
.data1 : { *(.data1) }
|
90 |
|
|
.got1 : { *(.got1) }
|
91 |
|
|
.dynamic : { *(.dynamic) }
|
92 |
|
|
/* Put .ctors and .dtors next to the .got2 section, so that the pointers
|
93 |
|
|
get relocated with -mrelocatable. Also put in the .fixup pointers.
|
94 |
|
|
The current compiler no longer needs this, but keep it around for 2.7.2 */
|
95 |
|
|
PROVIDE (_GOT2_START_ = .);
|
96 |
|
|
.got2 : { *(.got2) }
|
97 |
|
|
PROVIDE (__GOT2_END__ = .);
|
98 |
|
|
PROVIDE (__CTOR_LIST__ = .);
|
99 |
|
|
.ctors : { *(.ctors) }
|
100 |
|
|
PROVIDE (__CTOR_END__ = .);
|
101 |
|
|
PROVIDE (__DTOR_LIST__ = .);
|
102 |
|
|
.dtors : { *(.dtors) }
|
103 |
|
|
PROVIDE (__DTOR_END__ = .);
|
104 |
|
|
PROVIDE (_FIXUP_START_ = .);
|
105 |
|
|
.fixup : { *(.fixup) }
|
106 |
|
|
PROVIDE (_FIXUP_END_ = .);
|
107 |
|
|
PROVIDE (__FIXUP_END__ = .);
|
108 |
|
|
PROVIDE (_GOT2_END_ = .);
|
109 |
|
|
PROVIDE (_GOT_START_ = .);
|
110 |
|
|
s.got = .;
|
111 |
|
|
.got : { *(.got) }
|
112 |
|
|
.got.plt : { *(.got.plt) }
|
113 |
|
|
PROVIDE (_GOT_END_ = .);
|
114 |
|
|
PROVIDE (__GOT_END__ = .);
|
115 |
|
|
/* We want the small data sections together, so single-instruction offsets
|
116 |
|
|
can access them all, and initialized data all before uninitialized, so
|
117 |
|
|
we can shorten the on-disk segment size. */
|
118 |
|
|
PROVIDE (__SDATA_START__ = .);
|
119 |
|
|
.sdata : { *(.sdata) }
|
120 |
|
|
_edata = .;
|
121 |
|
|
PROVIDE (edata = .);
|
122 |
|
|
. = ALIGN(8) + 0x1000;
|
123 |
|
|
PROVIDE (__SBSS_START__ = .);
|
124 |
|
|
.sbss :
|
125 |
|
|
{
|
126 |
|
|
PROVIDE (__sbss_start = .);
|
127 |
|
|
*(.sbss)
|
128 |
|
|
*(.scommon)
|
129 |
|
|
PROVIDE (__sbss_end = .);
|
130 |
|
|
}
|
131 |
|
|
PROVIDE (__SBSS_END__ = .);
|
132 |
|
|
.bss :
|
133 |
|
|
{
|
134 |
|
|
PROVIDE (__bss_start = .);
|
135 |
|
|
*(.dynbss)
|
136 |
|
|
*(.bss)
|
137 |
|
|
*(COMMON)
|
138 |
|
|
PROVIDE (__bss_end = .);
|
139 |
|
|
}
|
140 |
|
|
. = ALIGN(8) + 0x8000;
|
141 |
|
|
PROVIDE (__stack = .);
|
142 |
|
|
_end = . ;
|
143 |
|
|
PROVIDE (end = .);
|
144 |
|
|
|
145 |
|
|
/* These are needed for ELF backends which have not yet been
|
146 |
|
|
converted to the new style linker. */
|
147 |
|
|
.stab 0 : { *(.stab) }
|
148 |
|
|
.stabstr 0 : { *(.stabstr) }
|
149 |
|
|
/* DWARF debug sections.
|
150 |
|
|
Symbols in the DWARF debugging sections are relative to the beginning
|
151 |
|
|
of the section so we begin them at 0. */
|
152 |
|
|
/* DWARF 1 */
|
153 |
|
|
.debug 0 : { *(.debug) }
|
154 |
|
|
.line 0 : { *(.line) }
|
155 |
|
|
/* GNU DWARF 1 extensions */
|
156 |
|
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
157 |
|
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
158 |
|
|
/* DWARF 1.1 and DWARF 2 */
|
159 |
|
|
.debug_aranges 0 : { *(.debug_aranges) }
|
160 |
|
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
161 |
|
|
/* DWARF 2 */
|
162 |
|
|
.debug_info 0 : { *(.debug_info) }
|
163 |
|
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
164 |
|
|
.debug_line 0 : { *(.debug_line) }
|
165 |
|
|
.debug_frame 0 : { *(.debug_frame) }
|
166 |
|
|
.debug_str 0 : { *(.debug_str) }
|
167 |
|
|
.debug_loc 0 : { *(.debug_loc) }
|
168 |
|
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
169 |
|
|
/* SGI/MIPS DWARF 2 extensions */
|
170 |
|
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
171 |
|
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
172 |
|
|
.debug_typenames 0 : { *(.debug_typenames) }
|
173 |
|
|
.debug_varnames 0 : { *(.debug_varnames) }
|
174 |
|
|
/* These must appear regardless of . */
|
175 |
|
|
}
|