1 /* Script for --shared -z combreloc: shared library, combine & sort relocs */
2 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
6 SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
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) }
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) }
22 *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
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.*)
32 *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
38 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
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.*)
47 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
66 *(.text.unlikely .text.*_unlikely)
67 *(.text.exit .text.exit.*)
68 *(.text.startup .text.startup.*)
69 *(.text.hot .text.hot.*)
70 *(.text .stub .text.* .gnu.linkonce.t.*)
71 /* .gnu.warning sections are handled specially by elf32.em. */
73 *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
79 PROVIDE (__etext = .);
82 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
83 .rodata1 : { *(.rodata1) }
84 .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
85 PROVIDE_HIDDEN (__exidx_start = .);
86 .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
87 PROVIDE_HIDDEN (__exidx_end = .);
88 .eh_frame_hdr : { *(.eh_frame_hdr) }
89 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
90 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
91 /* Adjust the address for the data segment. We want to adjust up to
92 the same address within the page on the next page up. */
93 . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
94 /* Exception handling */
95 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
96 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
97 /* Thread Local Storage sections */
98 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
99 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
102 KEEP (*(.preinit_array))
106 KEEP (*(SORT(.init_array.*)))
107 KEEP (*(.init_array))
111 KEEP (*(SORT(.fini_array.*)))
112 KEEP (*(.fini_array))
116 /* gcc uses crtbegin.o to find the start of
117 the constructors, so we make sure it is
118 first. Because this is a wildcard, it
119 doesn't matter if the user does not
120 actually link against crtbegin.o; the
121 linker won't look for a file to match a
122 wildcard. The wildcard also means that it
123 doesn't matter which directory crtbegin.o
125 KEEP (*crtbegin.o(.ctors))
126 KEEP (*crtbegin?.o(.ctors))
127 /* We don't want to include the .ctor section from
128 the crtend.o file until after the sorted ctors.
129 The .ctor section from the crtend file contains the
130 end of ctors marker and it must be last */
131 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
132 KEEP (*(SORT(.ctors.*)))
137 KEEP (*crtbegin.o(.dtors))
138 KEEP (*crtbegin?.o(.dtors))
139 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
140 KEEP (*(SORT(.dtors.*)))
143 .jcr : { KEEP (*(.jcr)) }
144 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
145 .dynamic : { *(.dynamic) }
146 . = DATA_SEGMENT_RELRO_END (0, .);
147 .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
150 PROVIDE (__data_start = .);
151 *(.data .data.* .gnu.linkonce.d.*)
154 .data1 : { *(.data1) }
155 _edata = .; PROVIDE (edata = .);
161 *(.bss .bss.* .gnu.linkonce.b.*)
163 /* Align here to ensure that the .bss section occupies space up to
164 _end. Align after .bss to ensure correct alignment even if the
165 .bss section disappears because there are no input sections.
166 FIXME: Why do we need it? When there is no .bss section, we don't
167 pad the .data section. */
168 . = ALIGN(. != 0 ? 32 / 8 : 1);
170 _bss_end__ = . ; __bss_end__ = . ;
174 _end = .; PROVIDE (end = .);
175 . = DATA_SEGMENT_END (.);
176 /* Stabs debugging sections. */
177 .stab 0 : { *(.stab) }
178 .stabstr 0 : { *(.stabstr) }
179 .stab.excl 0 : { *(.stab.excl) }
180 .stab.exclstr 0 : { *(.stab.exclstr) }
181 .stab.index 0 : { *(.stab.index) }
182 .stab.indexstr 0 : { *(.stab.indexstr) }
183 .comment 0 : { *(.comment) }
184 /* DWARF debug sections.
185 Symbols in the DWARF debugging sections are relative to the beginning
186 of the section so we begin them at 0. */
188 .debug 0 : { *(.debug) }
189 .line 0 : { *(.line) }
190 /* GNU DWARF 1 extensions */
191 .debug_srcinfo 0 : { *(.debug_srcinfo) }
192 .debug_sfnames 0 : { *(.debug_sfnames) }
193 /* DWARF 1.1 and DWARF 2 */
194 .debug_aranges 0 : { *(.debug_aranges) }
195 .debug_pubnames 0 : { *(.debug_pubnames) }
197 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
198 .debug_abbrev 0 : { *(.debug_abbrev) }
199 .debug_line 0 : { *(.debug_line) }
200 .debug_frame 0 : { *(.debug_frame) }
201 .debug_str 0 : { *(.debug_str) }
202 .debug_loc 0 : { *(.debug_loc) }
203 .debug_macinfo 0 : { *(.debug_macinfo) }
204 /* SGI/MIPS DWARF 2 extensions */
205 .debug_weaknames 0 : { *(.debug_weaknames) }
206 .debug_funcnames 0 : { *(.debug_funcnames) }
207 .debug_typenames 0 : { *(.debug_typenames) }
208 .debug_varnames 0 : { *(.debug_varnames) }
210 .debug_pubtypes 0 : { *(.debug_pubtypes) }
211 .debug_ranges 0 : { *(.debug_ranges) }
212 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
213 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
214 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }