2 * Linker script for COM32 binaries using libcom32
5 /* Script for -z combreloc: combine and sort reloc sections */
6 OUTPUT_FORMAT("elf32-i386", "elf32-i386",
13 /* Read-only sections, merged into text segment: */
15 PROVIDE (__executable_start = .);
24 *(.text .stub .text.* .gnu.linkonce.t.*)
25 /* .gnu.warning sections are handled specially by elf32.em. */
35 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
36 .rodata1 : { *(.rodata1) }
39 /* Ensure the __preinit_array_start label is properly aligned. We
40 could instead move the label definition inside the section, but
41 the linker would then create the section even if it turns out to
42 be empty, which isn't pretty. */
45 PROVIDE (__preinit_array_start = .);
47 PROVIDE (__preinit_array_end = .);
50 PROVIDE (__init_array_start = .);
52 PROVIDE (__init_array_end = .);
55 PROVIDE (__fini_array_start = .);
57 PROVIDE (__fini_array_end = .);
60 PROVIDE (__ctors_start = .);
61 KEEP (*(SORT(.ctors.*)))
63 PROVIDE (__ctors_end = .);
66 PROVIDE (__dtors_start = .);
67 KEEP (*(SORT(.dtors.*)))
69 PROVIDE (__dtors_end = .);
73 PROVIDE (__got_start = .);
76 PROVIDE (__got_end = .);
79 /* Adjust the address for the data segment. Avoid mixing code and
80 data within same 128-byte chunk. */
86 KEEP(*(.data .data.* .gnu.linkonce.d.*))
97 *(.bss .bss.* .gnu.linkonce.b.*)
99 /* Align here to ensure that the .bss section occupies space up to
100 _end. Align after .bss to ensure correct alignment even if the
101 .bss section disappears because there are no input sections. */
107 /* Stabs debugging sections. */
108 .stab 0 : { *(.stab) }
109 .stabstr 0 : { *(.stabstr) }
110 .stab.excl 0 : { *(.stab.excl) }
111 .stab.exclstr 0 : { *(.stab.exclstr) }
112 .stab.index 0 : { *(.stab.index) }
113 .stab.indexstr 0 : { *(.stab.indexstr) }
114 .comment 0 : { *(.comment) }
115 /* DWARF debug sections.
116 Symbols in the DWARF debugging sections are relative to the beginning
117 of the section so we begin them at 0. */
119 .debug 0 : { *(.debug) }
120 .line 0 : { *(.line) }
121 /* GNU DWARF 1 extensions */
122 .debug_srcinfo 0 : { *(.debug_srcinfo) }
123 .debug_sfnames 0 : { *(.debug_sfnames) }
124 /* DWARF 1.1 and DWARF 2 */
125 .debug_aranges 0 : { *(.debug_aranges) }
126 .debug_pubnames 0 : { *(.debug_pubnames) }
128 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
129 .debug_abbrev 0 : { *(.debug_abbrev) }
130 .debug_line 0 : { *(.debug_line) }
131 .debug_frame 0 : { *(.debug_frame) }
132 .debug_str 0 : { *(.debug_str) }
133 .debug_loc 0 : { *(.debug_loc) }
134 .debug_macinfo 0 : { *(.debug_macinfo) }
135 /* SGI/MIPS DWARF 2 extensions */
136 .debug_weaknames 0 : { *(.debug_weaknames) }
137 .debug_funcnames 0 : { *(.debug_funcnames) }
138 .debug_typenames 0 : { *(.debug_typenames) }
139 .debug_varnames 0 : { *(.debug_varnames) }
140 /DISCARD/ : { *(.note.GNU-stack) }