196ae6ea0SThomas Gleixner/* 296ae6ea0SThomas Gleixner * setup.ld 396ae6ea0SThomas Gleixner * 496ae6ea0SThomas Gleixner * Linker script for the i386 setup code 596ae6ea0SThomas Gleixner */ 6e6d7bc0bSBorislav PetkovOUTPUT_FORMAT("elf32-i386") 796ae6ea0SThomas GleixnerOUTPUT_ARCH(i386) 896ae6ea0SThomas GleixnerENTRY(_start) 996ae6ea0SThomas Gleixner 1096ae6ea0SThomas GleixnerSECTIONS 1196ae6ea0SThomas Gleixner{ 1296ae6ea0SThomas Gleixner . = 0; 13d9b6b6e8SArd Biesheuvel .bstext : { 14d9b6b6e8SArd Biesheuvel *(.bstext) 1509c205afSH. Peter Anvin . = 495; 16d9b6b6e8SArd Biesheuvel } =0xffffffff 17d9b6b6e8SArd Biesheuvel 1896ae6ea0SThomas Gleixner .header : { *(.header) } 197a734e7dSH. Peter Anvin .entrytext : { *(.entrytext) } 2096ae6ea0SThomas Gleixner .inittext : { *(.inittext) } 2196ae6ea0SThomas Gleixner .initdata : { *(.initdata) } 227a734e7dSH. Peter Anvin __end_init = .; 237a734e7dSH. Peter Anvin 242e7a858bSArvind Sankar .text : { *(.text .text.*) } 25be721696SH. Peter Anvin .text32 : { *(.text32) } 2696ae6ea0SThomas Gleixner 2796ae6ea0SThomas Gleixner . = ALIGN(16); 2896ae6ea0SThomas Gleixner .rodata : { *(.rodata*) } 2996ae6ea0SThomas Gleixner 3096ae6ea0SThomas Gleixner .videocards : { 3196ae6ea0SThomas Gleixner video_cards = .; 3296ae6ea0SThomas Gleixner *(.videocards) 3396ae6ea0SThomas Gleixner video_cards_end = .; 3496ae6ea0SThomas Gleixner } 3596ae6ea0SThomas Gleixner 3696ae6ea0SThomas Gleixner . = ALIGN(16); 3796ae6ea0SThomas Gleixner .data : { *(.data*) } 3896ae6ea0SThomas Gleixner 3996ae6ea0SThomas Gleixner .signature : { 4096ae6ea0SThomas Gleixner setup_sig = .; 4196ae6ea0SThomas Gleixner LONG(0x5a5aaa55) 42*c731fbcfSArd Biesheuvel 43*c731fbcfSArd Biesheuvel /* Reserve some extra space for the reloc and compat sections */ 44*c731fbcfSArd Biesheuvel setup_size = ALIGN(ABSOLUTE(.) + 64, 512); 45*c731fbcfSArd Biesheuvel setup_sects = ABSOLUTE(setup_size / 512); 4696ae6ea0SThomas Gleixner } 4796ae6ea0SThomas Gleixner 4896ae6ea0SThomas Gleixner 4996ae6ea0SThomas Gleixner . = ALIGN(16); 5096ae6ea0SThomas Gleixner .bss : 5196ae6ea0SThomas Gleixner { 5296ae6ea0SThomas Gleixner __bss_start = .; 5396ae6ea0SThomas Gleixner *(.bss) 5496ae6ea0SThomas Gleixner __bss_end = .; 5596ae6ea0SThomas Gleixner } 5696ae6ea0SThomas Gleixner . = ALIGN(16); 5796ae6ea0SThomas Gleixner _end = .; 5896ae6ea0SThomas Gleixner 59163159aaSIlie Halip /DISCARD/ : { 60163159aaSIlie Halip *(.note*) 61163159aaSIlie Halip } 6296ae6ea0SThomas Gleixner 63a5912f6bSIngo Molnar /* 64a5912f6bSIngo Molnar * The ASSERT() sink to . is intentional, for binutils 2.14 compatibility: 65a5912f6bSIngo Molnar */ 6696ae6ea0SThomas Gleixner . = ASSERT(_end <= 0x8000, "Setup too big!"); 6796ae6ea0SThomas Gleixner . = ASSERT(hdr == 0x1f1, "The setup header has the wrong offset!"); 687a734e7dSH. Peter Anvin /* Necessary for the very-old-loader check to work... */ 697a734e7dSH. Peter Anvin . = ASSERT(__end_init <= 5*512, "init sections too big!"); 707a734e7dSH. Peter Anvin 7196ae6ea0SThomas Gleixner} 72