2 * Linker script for an MS-DOS EXE binary; this hard-codes a simple
3 * MZ header without relocations.
5 * For documentation on the MS-DOS MZ EXE format, see:
6 * http://www.delorie.com/djgpp/doc/exe/
10 /* Script for -z combreloc: combine and sort reloc sections */
11 OUTPUT_FORMAT("elf32-i386", "elf32-i386",
20 /* EXE header, from header.S */
30 .payload : AT (__payload_lma) {
35 __payload_len = __payload_end - __payload_start;
36 __payload_dwords = __payload_len >> 2;
39 __text_lma = __payload_lma + .;
40 __payload_sseg = (__payload_lma - __text_lma) >> 4;
41 _exe_text_seg = (__text_lma - __header_size) >> 4;
44 .text : AT (__text_lma) {
45 *(.text .stub .text.* .gnu.linkonce.t.*)
52 .rodata : AT (__rodata_vma + __text_lma) {
53 *(.rodata .rodata.* .gnu.linkonce.r.*)
56 /* Adjust the address for the data segment. Avoid mixing code and
57 data within same 128-byte chunk. */
60 .data : AT (__data_vma + __text_lma) {
61 *(.data .data.* .gnu.linkonce.d.*)
64 .data1 : { *(.data1) }
67 _exe_edata_low = ((_edata + __text_lma) & 511);
68 _exe_edata_blocks = ((_edata + __text_lma) + 511) >> 9;
73 *(.bss .bss.* .gnu.linkonce.b.*)
94 _exe_bss_paras = (_end - __bss_start) >> 4;
97 /* Stabs debugging sections. */
98 .stab 0 : { *(.stab) }
99 .stabstr 0 : { *(.stabstr) }
100 .stab.excl 0 : { *(.stab.excl) }
101 .stab.exclstr 0 : { *(.stab.exclstr) }
102 .stab.index 0 : { *(.stab.index) }
103 .stab.indexstr 0 : { *(.stab.indexstr) }
104 .comment 0 : { *(.comment) }
105 /* DWARF debug sections.
106 Symbols in the DWARF debugging sections are relative to the beginning
107 of the section so we begin them at 0. */
109 .debug 0 : { *(.debug) }
110 .line 0 : { *(.line) }
111 /* GNU DWARF 1 extensions */
112 .debug_srcinfo 0 : { *(.debug_srcinfo) }
113 .debug_sfnames 0 : { *(.debug_sfnames) }
114 /* DWARF 1.1 and DWARF 2 */
115 .debug_aranges 0 : { *(.debug_aranges) }
116 .debug_pubnames 0 : { *(.debug_pubnames) }
118 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
119 .debug_abbrev 0 : { *(.debug_abbrev) }
120 .debug_line 0 : { *(.debug_line) }
121 .debug_frame 0 : { *(.debug_frame) }
122 .debug_str 0 : { *(.debug_str) }
123 .debug_loc 0 : { *(.debug_loc) }
124 .debug_macinfo 0 : { *(.debug_macinfo) }
125 /* SGI/MIPS DWARF 2 extensions */
126 .debug_weaknames 0 : { *(.debug_weaknames) }
127 .debug_funcnames 0 : { *(.debug_funcnames) }
128 .debug_typenames 0 : { *(.debug_typenames) }
129 .debug_varnames 0 : { *(.debug_varnames) }
130 /DISCARD/ : { *(.note.GNU-stack) }