setup.ld 1.1 KB

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