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_ldlinux_size;
30 .payload : AT (__payload_lma) {
35 __payload_len = ABSOLUTE(__payload_end) - ABSOLUTE(__payload_start);
36 __payload_dwords = __payload_len >> 2;
38 __text_lma = __payload_lma + syslinux_ldlinux_size;
39 __payload_sseg = (__payload_lma - __text_lma) >> 4;
40 _exe_text_seg = (__text_lma - __header_size) >> 4;
43 * __assert1 = ASSERT((__payload_len == syslinux_ldlinux_size),
44 * "syslinux_ldlinux_size must equal the size of .payload");
47 .text : AT (__text_lma) {
48 *(.text .stub .text.* .gnu.linkonce.t.*)
55 .rodata : AT (__rodata_vma + __text_lma) {
56 *(.rodata .rodata.* .gnu.linkonce.r.*)
59 /* Adjust the address for the data segment. Avoid mixing code and
60 data within same 128-byte chunk. */
63 .data : AT (__data_vma + __text_lma) {
64 *(.data .data.* .gnu.linkonce.d.*)
67 .data1 : { *(.data1) }
70 _exe_edata_low = ((_edata + __text_lma) & 511);
71 _exe_edata_blocks = ((_edata + __text_lma) + 511) >> 9;
76 *(.bss .bss.* .gnu.linkonce.b.*)
97 _exe_bss_paras = (_end - __bss_start) >> 4;
100 /* Stabs debugging sections. */
101 .stab 0 : { *(.stab) }
102 .stabstr 0 : { *(.stabstr) }
103 .stab.excl 0 : { *(.stab.excl) }
104 .stab.exclstr 0 : { *(.stab.exclstr) }
105 .stab.index 0 : { *(.stab.index) }
106 .stab.indexstr 0 : { *(.stab.indexstr) }
107 .comment 0 : { *(.comment) }
108 /* DWARF debug sections.
109 Symbols in the DWARF debugging sections are relative to the beginning
110 of the section so we begin them at 0. */
112 .debug 0 : { *(.debug) }
113 .line 0 : { *(.line) }
114 /* GNU DWARF 1 extensions */
115 .debug_srcinfo 0 : { *(.debug_srcinfo) }
116 .debug_sfnames 0 : { *(.debug_sfnames) }
117 /* DWARF 1.1 and DWARF 2 */
118 .debug_aranges 0 : { *(.debug_aranges) }
119 .debug_pubnames 0 : { *(.debug_pubnames) }
121 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
122 .debug_abbrev 0 : { *(.debug_abbrev) }
123 .debug_line 0 : { *(.debug_line) }
124 .debug_frame 0 : { *(.debug_frame) }
125 .debug_str 0 : { *(.debug_str) }
126 .debug_loc 0 : { *(.debug_loc) }
127 .debug_macinfo 0 : { *(.debug_macinfo) }
128 /* SGI/MIPS DWARF 2 extensions */
129 .debug_weaknames 0 : { *(.debug_weaknames) }
130 .debug_funcnames 0 : { *(.debug_funcnames) }
131 .debug_typenames 0 : { *(.debug_typenames) }
132 .debug_varnames 0 : { *(.debug_varnames) }
133 /DISCARD/ : { *(.note.GNU-stack) }