^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) * setup.ld
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Linker script for the i386 setup code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) OUTPUT_FORMAT("elf32-i386")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) OUTPUT_ARCH(i386)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) ENTRY(_start)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) SECTIONS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) . = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) .bstext : { *(.bstext) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) .bsdata : { *(.bsdata) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) . = 495;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) .header : { *(.header) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) .entrytext : { *(.entrytext) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) .inittext : { *(.inittext) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) .initdata : { *(.initdata) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) __end_init = .;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) .text : { *(.text .text.*) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) .text32 : { *(.text32) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) . = ALIGN(16);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) .rodata : { *(.rodata*) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) .videocards : {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) video_cards = .;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) *(.videocards)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) video_cards_end = .;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) . = ALIGN(16);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) .data : { *(.data*) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) .signature : {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) setup_sig = .;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) LONG(0x5a5aaa55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) . = ALIGN(16);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) .bss :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) __bss_start = .;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) *(.bss)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) __bss_end = .;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) . = ALIGN(16);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) _end = .;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) /DISCARD/ : {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) *(.note*)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) * The ASSERT() sink to . is intentional, for binutils 2.14 compatibility:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) . = ASSERT(_end <= 0x8000, "Setup too big!");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) . = ASSERT(hdr == 0x1f1, "The setup header has the wrong offset!");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) /* Necessary for the very-old-loader check to work... */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) . = ASSERT(__end_init <= 5*512, "init sections too big!");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) }