1 /* 2 * Linker script for MBR 3 */ 4 5 /* Script for -z combreloc: combine and sort reloc sections */ 6 OUTPUT_FORMAT("elf32-i386", "elf32-i386", 7 "elf32-i386") 8 OUTPUT_ARCH(i386) 9 EXTERN(_start) 10 ENTRY(_start) 11 SECTIONS 12 { 13 /* Read-only sections, merged into text segment: */ 14 . = 0x600; 15 .text : 16 { 17 *(.text*) 18 *(.rodata*) 19 } =0x90909090 20 21 . = ALIGN(4); 22 .data : 23 { 24 *(.data*) 25 } 26 27 . = ALIGN(128); 28 .bss : 29 { 30 *(.bss*) 31 } 32 33 . = 0x7c00; 34 .bootsec : 35 { 36 *(.bootsec) 37 } 38 39 /* Stabs debugging sections. */ 40 .stab 0 : { *(.stab) } 41 .stabstr 0 : { *(.stabstr) } 42 .stab.excl 0 : { *(.stab.excl) } 43 .stab.exclstr 0 : { *(.stab.exclstr) } 44 .stab.index 0 : { *(.stab.index) } 45 .stab.indexstr 0 : { *(.stab.indexstr) } 46 .comment 0 : { *(.comment) } 47 /* DWARF debug sections. 48 Symbols in the DWARF debugging sections are relative to the beginning 49 of the section so we begin them at 0. */ 50 /* DWARF 1 */ 51 .debug 0 : { *(.debug) } 52 .line 0 : { *(.line) } 53 /* GNU DWARF 1 extensions */ 54 .debug_srcinfo 0 : { *(.debug_srcinfo) } 55 .debug_sfnames 0 : { *(.debug_sfnames) } 56 /* DWARF 1.1 and DWARF 2 */ 57 .debug_aranges 0 : { *(.debug_aranges) } 58 .debug_pubnames 0 : { *(.debug_pubnames) } 59 /* DWARF 2 */ 60 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } 61 .debug_abbrev 0 : { *(.debug_abbrev) } 62 .debug_line 0 : { *(.debug_line) } 63 .debug_frame 0 : { *(.debug_frame) } 64 .debug_str 0 : { *(.debug_str) } 65 .debug_loc 0 : { *(.debug_loc) } 66 .debug_macinfo 0 : { *(.debug_macinfo) } 67 /* SGI/MIPS DWARF 2 extensions */ 68 .debug_weaknames 0 : { *(.debug_weaknames) } 69 .debug_funcnames 0 : { *(.debug_funcnames) } 70 .debug_typenames 0 : { *(.debug_typenames) } 71 .debug_varnames 0 : { *(.debug_varnames) } 72 /DISCARD/ : { *(.note.GNU-stack) } 73 } 74