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 */
29 . = 0x100000000 - syslinux_size;
30 .payload : AT (__payload_lma) {
35 __payload_len = ABSOLUTE(__payload_end) - ABSOLUTE(__payload_start);
36 __payload_dwords = __payload_len >> 2;
38 __dgroup_lma = __payload_lma + syslinux_size;
39 __payload_sseg = (__payload_lma - __dgroup_lma) >> 4;
40 _exe_text_seg = (__dgroup_lma - __header_size) >> 4;
43 * __assert1 = ASSERT((__payload_len == syslinux_ldlinux_size),
44 * "syslinux_size must equal the size of .payload");
48 .null : AT(__dgroup_lma) {
54 .text : AT (__text_vma + __dgroup_lma) {
55 *(.text .stub .text.* .gnu.linkonce.t.*)
62 .rodata : AT (__rodata_vma + __dgroup_lma) {
63 *(.rodata .rodata.* .gnu.linkonce.r.*)
66 /* Adjust the address for the data segment. Avoid mixing code and
67 data within same 128-byte chunk. */
70 .data : AT (__data_vma + __dgroup_lma) {
71 *(.data .data.* .gnu.linkonce.d.*)
74 .data1 : { *(.data1) }
77 _exe_edata_low = ((_edata + __dgroup_lma) & 511);
78 _exe_edata_blocks = ((_edata + __dgroup_lma) + 511) >> 9;
83 *(.bss .bss.* .gnu.linkonce.b.*)
104 _exe_bss_paras = (_end - __bss_start) >> 4;
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) }