/* linker script shamelessly ripped from the linux kernel */ OUTPUT_FORMAT(elf64-x86-64) ENTRY(_start) SECTIONS { . = 0; . = 0x1F1; .header : { *(.header); } .entrytext : { *(.entrytext); } .inittext : { *(.inittext); } .initdata : { *(.initdata); } /* i dont actually know what this does, but it seems important */ .signature : { setup_sig = .; LONG(0x5a5aaa55); setup_size = ALIGN(ABSOLUTE(.), 4096); setup_sectors = ABSOLUTE(setup_size / 512); } . = ALIGN(16); .bss : { __bss_start = .; *(.bss); __bss_end = .; } . = ALIGN(0x1000); _end = .; /DISCARD/ : { *(.note.*); } }