Commit | Line | Data |
---|---|---|
4b86cbe9 CL |
1 | /* Script for --shared -z combreloc: shared library, combine & sort relocs */ |
2 | OUTPUT_FORMAT("elf32-littlearm-fdpic", "elf32-bigarm-fdpic", | |
3 | "elf32-littlearm-fdpic") | |
4 | OUTPUT_ARCH(arm) | |
5 | ENTRY(_start) | |
6 | SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); | |
7 | SECTIONS | |
8 | { | |
9 | /* Read-only sections, merged into text segment: */ | |
10 | . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; | |
11 | .note.gnu.build-id : { *(.note.gnu.build-id) } | |
12 | .hash : { *(.hash) } | |
13 | .gnu.hash : { *(.gnu.hash) } | |
14 | .dynsym : { *(.dynsym) } | |
15 | .dynstr : { *(.dynstr) } | |
16 | .gnu.version : { *(.gnu.version) } | |
17 | .gnu.version_d : { *(.gnu.version_d) } | |
18 | .gnu.version_r : { *(.gnu.version_r) } | |
19 | .rel.dyn : | |
20 | { | |
21 | *(.rel.init) | |
22 | *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) | |
23 | *(.rel.fini) | |
24 | *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) | |
25 | *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) | |
26 | *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) | |
27 | *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) | |
28 | *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) | |
29 | *(.rel.ctors) | |
30 | *(.rel.dtors) | |
31 | *(.rel.got) | |
32 | *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) | |
33 | *(.rel.iplt) | |
34 | } | |
35 | .rela.dyn : | |
36 | { | |
37 | *(.rela.init) | |
38 | *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) | |
39 | *(.rela.fini) | |
40 | *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) | |
41 | *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) | |
42 | *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) | |
43 | *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) | |
44 | *(.rela.ctors) | |
45 | *(.rela.dtors) | |
46 | *(.rela.got) | |
47 | *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) | |
48 | *(.rela.iplt) | |
49 | } | |
50 | .rel.plt : | |
51 | { | |
52 | *(.rel.plt) | |
53 | } | |
54 | .rela.plt : | |
55 | { | |
56 | *(.rela.plt) | |
57 | } | |
58 | .init : | |
59 | { | |
60 | KEEP (*(.init)) | |
61 | } =0 | |
62 | .plt : { *(.plt) } | |
63 | .iplt : { *(.iplt) } | |
64 | .text : | |
65 | { | |
66 | *(.text.unlikely .text.*_unlikely) | |
67 | *(.text.exit .text.exit.*) | |
68 | *(.text.startup .text.startup.*) | |
69 | *(.text.hot .text.hot.*) | |
5fa5f8f5 | 70 | *(SORT(.text.sorted.*)) |
4b86cbe9 | 71 | *(.text .stub .text.* .gnu.linkonce.t.*) |
075a2b89 | 72 | /* .gnu.warning sections are handled specially by elf.em. */ |
4b86cbe9 CL |
73 | *(.gnu.warning) |
74 | *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) | |
75 | } =0 | |
76 | .fini : | |
77 | { | |
78 | KEEP (*(.fini)) | |
79 | } =0 | |
80 | PROVIDE (__etext = .); | |
81 | PROVIDE (_etext = .); | |
82 | PROVIDE (etext = .); | |
83 | .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } | |
84 | .rodata1 : { *(.rodata1) } | |
85 | .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } | |
86 | PROVIDE_HIDDEN (__exidx_start = .); | |
87 | .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } | |
88 | PROVIDE_HIDDEN (__exidx_end = .); | |
89 | .rofixup : { | |
90 | __ROFIXUP_LIST__ = .; | |
91 | *(.rofixup) | |
92 | __ROFIXUP_END__ = .; | |
93 | } | |
94 | .eh_frame_hdr : { *(.eh_frame_hdr) } | |
95 | .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } | |
96 | .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table | |
97 | .gcc_except_table.*) } | |
98 | /* These sections are generated by the Sun/Oracle C++ compiler. */ | |
99 | .exception_ranges : ONLY_IF_RO { *(.exception_ranges | |
100 | .exception_ranges*) } | |
101 | /* Adjust the address for the data segment. We want to adjust up to | |
102 | the same address within the page on the next page up. */ | |
103 | . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); | |
104 | /* Exception handling */ | |
105 | .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } | |
106 | .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } | |
107 | .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } | |
108 | /* Thread Local Storage sections */ | |
109 | .tdata : | |
110 | { | |
111 | *(.tdata .tdata.* .gnu.linkonce.td.*) | |
112 | } | |
113 | .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } | |
114 | .preinit_array : | |
115 | { | |
116 | KEEP (*(.preinit_array)) | |
117 | } | |
118 | .init_array : | |
119 | { | |
120 | KEEP (*(SORT(.init_array.*))) | |
121 | KEEP (*(.init_array)) | |
122 | } | |
123 | .fini_array : | |
124 | { | |
125 | KEEP (*(SORT(.fini_array.*))) | |
126 | KEEP (*(.fini_array)) | |
127 | } | |
128 | .ctors : | |
129 | { | |
130 | /* gcc uses crtbegin.o to find the start of | |
131 | the constructors, so we make sure it is | |
132 | first. Because this is a wildcard, it | |
133 | doesn't matter if the user does not | |
134 | actually link against crtbegin.o; the | |
135 | linker won't look for a file to match a | |
136 | wildcard. The wildcard also means that it | |
137 | doesn't matter which directory crtbegin.o | |
138 | is in. */ | |
139 | KEEP (*crtbegin.o(.ctors)) | |
140 | KEEP (*crtbegin?.o(.ctors)) | |
141 | /* We don't want to include the .ctor section from | |
142 | the crtend.o file until after the sorted ctors. | |
143 | The .ctor section from the crtend file contains the | |
144 | end of ctors marker and it must be last */ | |
145 | KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) | |
146 | KEEP (*(SORT(.ctors.*))) | |
147 | KEEP (*(.ctors)) | |
148 | } | |
149 | .dtors : | |
150 | { | |
151 | KEEP (*crtbegin.o(.dtors)) | |
152 | KEEP (*crtbegin?.o(.dtors)) | |
153 | KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) | |
154 | KEEP (*(SORT(.dtors.*))) | |
155 | KEEP (*(.dtors)) | |
156 | } | |
157 | .jcr : { KEEP (*(.jcr)) } | |
158 | .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) } | |
159 | .dynamic : { *(.dynamic) } | |
160 | . = DATA_SEGMENT_RELRO_END (0, .); | |
161 | .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) } | |
162 | .data : | |
163 | { | |
164 | PROVIDE (__data_start = .); | |
165 | *(.data .data.* .gnu.linkonce.d.*) | |
166 | SORT(CONSTRUCTORS) | |
167 | } | |
168 | .data1 : { *(.data1) } | |
169 | _edata = .; PROVIDE (edata = .); | |
170 | __bss_start = .; | |
171 | __bss_start__ = .; | |
172 | .bss : | |
173 | { | |
174 | *(.dynbss) | |
175 | *(.bss .bss.* .gnu.linkonce.b.*) | |
176 | *(COMMON) | |
177 | /* Align here to ensure that the .bss section occupies space up to | |
178 | _end. Align after .bss to ensure correct alignment even if the | |
179 | .bss section disappears because there are no input sections. | |
180 | FIXME: Why do we need it? When there is no .bss section, we don't | |
181 | pad the .data section. */ | |
182 | . = ALIGN(. != 0 ? 32 / 8 : 1); | |
183 | } | |
184 | _bss_end__ = . ; __bss_end__ = . ; | |
185 | . = ALIGN(32 / 8); | |
186 | . = ALIGN(32 / 8); | |
187 | __end__ = . ; | |
188 | _end = .; PROVIDE (end = .); | |
189 | . = DATA_SEGMENT_END (.); | |
190 | /* Stabs debugging sections. */ | |
191 | .stab 0 : { *(.stab) } | |
192 | .stabstr 0 : { *(.stabstr) } | |
193 | .stab.excl 0 : { *(.stab.excl) } | |
194 | .stab.exclstr 0 : { *(.stab.exclstr) } | |
195 | .stab.index 0 : { *(.stab.index) } | |
196 | .stab.indexstr 0 : { *(.stab.indexstr) } | |
197 | .comment 0 : { *(.comment) } | |
198 | /* DWARF debug sections. | |
199 | Symbols in the DWARF debugging sections are relative to the beginning | |
200 | of the section so we begin them at 0. */ | |
201 | /* DWARF 1 */ | |
202 | .debug 0 : { *(.debug) } | |
203 | .line 0 : { *(.line) } | |
204 | /* GNU DWARF 1 extensions */ | |
205 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | |
206 | .debug_sfnames 0 : { *(.debug_sfnames) } | |
207 | /* DWARF 1.1 and DWARF 2 */ | |
208 | .debug_aranges 0 : { *(.debug_aranges) } | |
209 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
210 | /* DWARF 2 */ | |
211 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } | |
212 | .debug_abbrev 0 : { *(.debug_abbrev) } | |
213 | .debug_line 0 : { *(.debug_line) } | |
214 | .debug_frame 0 : { *(.debug_frame) } | |
215 | .debug_str 0 : { *(.debug_str) } | |
216 | .debug_loc 0 : { *(.debug_loc) } | |
217 | .debug_macinfo 0 : { *(.debug_macinfo) } | |
218 | /* SGI/MIPS DWARF 2 extensions */ | |
219 | .debug_weaknames 0 : { *(.debug_weaknames) } | |
220 | .debug_funcnames 0 : { *(.debug_funcnames) } | |
221 | .debug_typenames 0 : { *(.debug_typenames) } | |
222 | .debug_varnames 0 : { *(.debug_varnames) } | |
223 | /* DWARF 3 */ | |
224 | .debug_pubtypes 0 : { *(.debug_pubtypes) } | |
225 | .debug_ranges 0 : { *(.debug_ranges) } | |
226 | .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } | |
227 | .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } | |
228 | /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } | |
229 | } |