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