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