1 |
35 |
ultra_embe |
/* Script for ld -r: link without relocation */
|
2 |
|
|
OUTPUT_FORMAT("elf32-or1k", "elf32-or1k",
|
3 |
|
|
"elf32-or1k")
|
4 |
|
|
OUTPUT_ARCH(or1k)
|
5 |
|
|
/* For some reason, the Solaris linker makes bad executables
|
6 |
|
|
if gld -r is used and the intermediate file has sections starting
|
7 |
|
|
at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
|
8 |
|
|
bug. But for now assigning the zero vmas works. */
|
9 |
|
|
SECTIONS
|
10 |
|
|
{
|
11 |
|
|
/* Read-only sections, merged into text segment: */
|
12 |
|
|
.vectors 0 : { KEEP (*(.vectors)) }
|
13 |
|
|
.note.gnu.build-id : { *(.note.gnu.build-id) }
|
14 |
|
|
.hash 0 : { *(.hash) }
|
15 |
|
|
.gnu.hash 0 : { *(.gnu.hash) }
|
16 |
|
|
.dynsym 0 : { *(.dynsym) }
|
17 |
|
|
.dynstr 0 : { *(.dynstr) }
|
18 |
|
|
.gnu.version 0 : { *(.gnu.version) }
|
19 |
|
|
.gnu.version_d 0: { *(.gnu.version_d) }
|
20 |
|
|
.gnu.version_r 0: { *(.gnu.version_r) }
|
21 |
|
|
.rela.init 0 : { *(.rela.init) }
|
22 |
|
|
.rela.text 0 : { *(.rela.text) }
|
23 |
|
|
.rela.fini 0 : { *(.rela.fini) }
|
24 |
|
|
.rela.rodata 0 : { *(.rela.rodata) }
|
25 |
|
|
.rela.data.rel.ro 0 : { *(.rela.data.rel.ro) }
|
26 |
|
|
.rela.data 0 : { *(.rela.data) }
|
27 |
|
|
.rela.tdata 0 : { *(.rela.tdata) }
|
28 |
|
|
.rela.tbss 0 : { *(.rela.tbss) }
|
29 |
|
|
.rela.ctors 0 : { *(.rela.ctors) }
|
30 |
|
|
.rela.dtors 0 : { *(.rela.dtors) }
|
31 |
|
|
.rela.got 0 : { *(.rela.got) }
|
32 |
|
|
.rela.sdata 0 : { *(.rela.sdata) }
|
33 |
|
|
.rela.sbss 0 : { *(.rela.sbss) }
|
34 |
|
|
.rela.sdata2 0 : { *(.rela.sdata2) }
|
35 |
|
|
.rela.sbss2 0 : { *(.rela.sbss2) }
|
36 |
|
|
.rela.bss 0 : { *(.rela.bss) }
|
37 |
|
|
.rela.iplt 0 :
|
38 |
|
|
{
|
39 |
|
|
*(.rela.iplt)
|
40 |
|
|
}
|
41 |
|
|
.rela.plt 0 :
|
42 |
|
|
{
|
43 |
|
|
*(.rela.plt)
|
44 |
|
|
}
|
45 |
|
|
.init 0 :
|
46 |
|
|
{
|
47 |
|
|
KEEP (*(SORT_NONE(.init)))
|
48 |
|
|
} =0x15000000
|
49 |
|
|
.plt 0 : { *(.plt) }
|
50 |
|
|
.iplt 0 : { *(.iplt) }
|
51 |
|
|
.text 0 :
|
52 |
|
|
{
|
53 |
|
|
*(.text .stub)
|
54 |
|
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
55 |
|
|
*(.gnu.warning)
|
56 |
|
|
} =0x15000000
|
57 |
|
|
.fini 0 :
|
58 |
|
|
{
|
59 |
|
|
KEEP (*(SORT_NONE(.fini)))
|
60 |
|
|
} =0x15000000
|
61 |
|
|
.rodata 0 : { *(.rodata) }
|
62 |
|
|
.rodata1 0 : { *(.rodata1) }
|
63 |
|
|
.sdata2 0 :
|
64 |
|
|
{
|
65 |
|
|
*(.sdata2)
|
66 |
|
|
}
|
67 |
|
|
.sbss2 0 : { *(.sbss2) }
|
68 |
|
|
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
69 |
|
|
.eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
70 |
|
|
.gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table
|
71 |
|
|
.gcc_except_table.*) }
|
72 |
|
|
/* These sections are generated by the Sun/Oracle C++ compiler. */
|
73 |
|
|
.exception_ranges 0 : ONLY_IF_RO { *(.exception_ranges
|
74 |
|
|
.exception_ranges*) }
|
75 |
|
|
/* Adjust the address for the data segment. We want to adjust up to
|
76 |
|
|
the same address within the page on the next page up. */
|
77 |
|
|
/* Exception handling */
|
78 |
|
|
.eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
79 |
|
|
.gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
|
80 |
|
|
.exception_ranges 0 : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
|
81 |
|
|
/* Thread Local Storage sections */
|
82 |
|
|
.tdata 0 : { *(.tdata) }
|
83 |
|
|
.tbss 0 : { *(.tbss) }
|
84 |
|
|
.preinit_array 0 :
|
85 |
|
|
{
|
86 |
|
|
KEEP (*(.preinit_array))
|
87 |
|
|
}
|
88 |
|
|
.jcr 0 : { KEEP (*(.jcr)) }
|
89 |
|
|
.dynamic 0 : { *(.dynamic) }
|
90 |
|
|
.data 0 :
|
91 |
|
|
{
|
92 |
|
|
*(.data)
|
93 |
|
|
}
|
94 |
|
|
.data1 0 : { *(.data1) }
|
95 |
|
|
.got 0 : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
|
96 |
|
|
/* We want the small data sections together, so single-instruction offsets
|
97 |
|
|
can access them all, and initialized data all before uninitialized, so
|
98 |
|
|
we can shorten the on-disk segment size. */
|
99 |
|
|
.sdata 0 :
|
100 |
|
|
{
|
101 |
|
|
*(.sdata)
|
102 |
|
|
}
|
103 |
|
|
.sbss 0 :
|
104 |
|
|
{
|
105 |
|
|
*(.dynsbss)
|
106 |
|
|
*(.sbss)
|
107 |
|
|
*(.scommon)
|
108 |
|
|
}
|
109 |
|
|
.bss 0 :
|
110 |
|
|
{
|
111 |
|
|
*(.dynbss)
|
112 |
|
|
*(.bss)
|
113 |
|
|
*(COMMON)
|
114 |
|
|
/* Align here to ensure that the .bss section occupies space up to
|
115 |
|
|
_end. Align after .bss to ensure correct alignment even if the
|
116 |
|
|
.bss section disappears because there are no input sections.
|
117 |
|
|
FIXME: Why do we need it? When there is no .bss section, we don't
|
118 |
|
|
pad the .data section. */
|
119 |
|
|
}
|
120 |
|
|
/* Stabs debugging sections. */
|
121 |
|
|
.stab 0 : { *(.stab) }
|
122 |
|
|
.stabstr 0 : { *(.stabstr) }
|
123 |
|
|
.stab.excl 0 : { *(.stab.excl) }
|
124 |
|
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
125 |
|
|
.stab.index 0 : { *(.stab.index) }
|
126 |
|
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
127 |
|
|
.comment 0 : { *(.comment) }
|
128 |
|
|
/* DWARF debug sections.
|
129 |
|
|
Symbols in the DWARF debugging sections are relative to the beginning
|
130 |
|
|
of the section so we begin them at 0. */
|
131 |
|
|
/* DWARF 1 */
|
132 |
|
|
.debug 0 : { *(.debug) }
|
133 |
|
|
.line 0 : { *(.line) }
|
134 |
|
|
/* GNU DWARF 1 extensions */
|
135 |
|
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
136 |
|
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
137 |
|
|
/* DWARF 1.1 and DWARF 2 */
|
138 |
|
|
.debug_aranges 0 : { *(.debug_aranges) }
|
139 |
|
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
140 |
|
|
/* DWARF 2 */
|
141 |
|
|
.debug_info 0 : { *(.debug_info) }
|
142 |
|
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
143 |
|
|
.debug_line 0 : { *(.debug_line) }
|
144 |
|
|
.debug_frame 0 : { *(.debug_frame) }
|
145 |
|
|
.debug_str 0 : { *(.debug_str) }
|
146 |
|
|
.debug_loc 0 : { *(.debug_loc) }
|
147 |
|
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
148 |
|
|
/* SGI/MIPS DWARF 2 extensions */
|
149 |
|
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
150 |
|
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
151 |
|
|
.debug_typenames 0 : { *(.debug_typenames) }
|
152 |
|
|
.debug_varnames 0 : { *(.debug_varnames) }
|
153 |
|
|
/* DWARF 3 */
|
154 |
|
|
.debug_pubtypes 0 : { *(.debug_pubtypes) }
|
155 |
|
|
.debug_ranges 0 : { *(.debug_ranges) }
|
156 |
|
|
/* DWARF Extension. */
|
157 |
|
|
.debug_macro 0 : { *(.debug_macro) }
|
158 |
|
|
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
|
159 |
|
|
}
|