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