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 HIDDEN (__executable_start = .);
24 *(.text .stub .text.* .gnu.linkonce.t.*)
25 /* .gnu.warning sections are handled specially by elf32.em. */
34 HIDDEN( __rodata_start = .);
35 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
36 .rodata1 : { *(.rodata1) }
37 HIDDEN(__rodata_end = .);
40 * The difference betwee .ctors/.dtors and .init_array/.fini_array
41 * is the ordering, but we don't use prioritization for libcom32, so
42 * just lump them all together and hope that's okay.
46 HIDDEN(__ctors_start = .);
47 KEEP (*(SORT(.preinit_array*)))
48 KEEP (*(SORT(.init_array*)))
49 KEEP (*(SORT(.ctors*)))
50 HIDDEN(__ctors_end = .);
53 HIDDEN(__dtors_start = .);
54 KEEP (*(SORT(.fini_array*)))
55 KEEP (*(SORT(.dtors*)))
56 HIDDEN(__dtors_end = .);
60 HIDDEN(__got_start = .);
63 HIDDEN(__got_end = .);
66 /* Adjust the address for the data segment. Avoid mixing code and
67 data within same 128-byte chunk. */
73 KEEP(*(.data .data.* .gnu.linkonce.d.*))
80 HIDDEN(__bss_start = .);
84 *(.bss .bss.* .gnu.linkonce.b.*)
86 /* Align here to ensure that the .bss section occupies space up to
87 _end. Align after .bss to ensure correct alignment even if the
88 .bss section disappears because there are no input sections. */
94 /* Stabs debugging sections. */
95 .stab 0 : { *(.stab) }
96 .stabstr 0 : { *(.stabstr) }
97 .stab.excl 0 : { *(.stab.excl) }
98 .stab.exclstr 0 : { *(.stab.exclstr) }
99 .stab.index 0 : { *(.stab.index) }
100 .stab.indexstr 0 : { *(.stab.indexstr) }
101 .comment 0 : { *(.comment) }
102 /* DWARF debug sections.
103 Symbols in the DWARF debugging sections are relative to the beginning
104 of the section so we begin them at 0. */
106 .debug 0 : { *(.debug) }
107 .line 0 : { *(.line) }
108 /* GNU DWARF 1 extensions */
109 .debug_srcinfo 0 : { *(.debug_srcinfo) }
110 .debug_sfnames 0 : { *(.debug_sfnames) }
111 /* DWARF 1.1 and DWARF 2 */
112 .debug_aranges 0 : { *(.debug_aranges) }
113 .debug_pubnames 0 : { *(.debug_pubnames) }
115 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
116 .debug_abbrev 0 : { *(.debug_abbrev) }
117 .debug_line 0 : { *(.debug_line) }
118 .debug_frame 0 : { *(.debug_frame) }
119 .debug_str 0 : { *(.debug_str) }
120 .debug_loc 0 : { *(.debug_loc) }
121 .debug_macinfo 0 : { *(.debug_macinfo) }
122 /* SGI/MIPS DWARF 2 extensions */
123 .debug_weaknames 0 : { *(.debug_weaknames) }
124 .debug_funcnames 0 : { *(.debug_funcnames) }
125 .debug_typenames 0 : { *(.debug_typenames) }
126 .debug_varnames 0 : { *(.debug_varnames) }
127 /DISCARD/ : { *(.note.GNU-stack) }