2 * Linker script for ELF dynamic loaded modules.
5 /* Script for --shared -z combreloc: shared library, combine & sort relocs */
6 OUTPUT_FORMAT("elf32-i386", "elf32-i386",
11 /* Read-only sections, merged into text segment: */
12 . = 0 + SIZEOF_HEADERS;
13 .note.gnu.build-id : { *(.note.gnu.build-id) }
15 .gnu.hash : { *(.gnu.hash) }
16 .dynsym : { *(.dynsym) }
17 .dynstr : { *(.dynstr) }
18 .gnu.version : { *(.gnu.version) }
19 .gnu.version_d : { *(.gnu.version_d) }
20 .gnu.version_r : { *(.gnu.version_r) }
24 *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
26 *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
27 *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
28 *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
29 *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
30 *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
34 *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
39 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
41 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
42 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
43 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
44 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
48 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
50 .rel.plt : { *(.rel.plt) }
51 .rela.plt : { *(.rela.plt) }
59 *(.text .stub .text.* .gnu.linkonce.t.*)
60 KEEP (*(.text.*personality*))
61 /* .gnu.warning sections are handled specially by elf32.em. */
68 PROVIDE (__etext = .);
71 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
72 .rodata1 : { *(.rodata1) }
76 KEEP (*(.preinit_array))
81 KEEP (*(SORT(.ctors.*)))
83 KEEP (*(.ctors_modinit))
84 KEEP (*(.ctors_modmain))
85 KEEP (*(SORT(.init_array.*)))
93 KEEP (*(SORT(.dtors.*)))
95 KEEP (*(.dtors_modexit))
97 KEEP (*(SORT(.fini_array.*)))
101 .jcr : { KEEP (*(.jcr)) }
102 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
103 .dynamic : { *(.dynamic) }
105 /*. = DATA_SEGMENT_RELRO_END (12, .); -> This gives a "invalid assignment to location counter" error */
106 .got.plt : { *(.got.plt) }
109 *(.data .data.* .gnu.linkonce.d.*)
110 KEEP (*(.gnu.linkonce.d.*personality*))
113 .data1 : { *(.data1) }
115 PROVIDE (_edata = .);
119 *(.bss .bss.* .gnu.linkonce.b.*)
121 /* Align here to ensure that the .bss section occupies space up to
122 _end. Align after .bss to ensure correct alignment even if the
123 .bss section disappears because there are no input sections.
124 FIXME: Why do we need it? When there is no .bss section, we don't
125 pad the .data section. */
126 . = ALIGN(. != 0 ? 32 / 8 : 1);
132 /*. = DATA_SEGMENT_END (.); -> This gives a "invalid assignment to location counter" error */
133 /* Stabs debugging sections. */
134 .stab 0 : { *(.stab) }
135 .stabstr 0 : { *(.stabstr) }
136 .stab.excl 0 : { *(.stab.excl) }
137 .stab.exclstr 0 : { *(.stab.exclstr) }
138 .stab.index 0 : { *(.stab.index) }
139 .stab.indexstr 0 : { *(.stab.indexstr) }
140 .comment 0 : { *(.comment) }
141 /* DWARF debug sections.
142 Symbols in the DWARF debugging sections are relative to the beginning
143 of the section so we begin them at 0. */
145 .debug 0 : { *(.debug) }
146 .line 0 : { *(.line) }
147 /* GNU DWARF 1 extensions */
148 .debug_srcinfo 0 : { *(.debug_srcinfo) }
149 .debug_sfnames 0 : { *(.debug_sfnames) }
150 /* DWARF 1.1 and DWARF 2 */
151 .debug_aranges 0 : { *(.debug_aranges) }
152 .debug_pubnames 0 : { *(.debug_pubnames) }
154 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
155 .debug_abbrev 0 : { *(.debug_abbrev) }
156 .debug_line 0 : { *(.debug_line) }
157 .debug_frame 0 : { *(.debug_frame) }
158 .debug_str 0 : { *(.debug_str) }
159 .debug_loc 0 : { *(.debug_loc) }
160 .debug_macinfo 0 : { *(.debug_macinfo) }
161 /* SGI/MIPS DWARF 2 extensions */
162 .debug_weaknames 0 : { *(.debug_weaknames) }
163 .debug_funcnames 0 : { *(.debug_funcnames) }
164 .debug_typenames 0 : { *(.debug_typenames) }
165 .debug_varnames 0 : { *(.debug_varnames) }
167 .debug_pubtypes 0 : { *(.debug_pubtypes) }
168 .debug_ranges 0 : { *(.debug_ranges) }
169 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
170 /DISCARD/ : { *(.eh_frame) }