mbr.ld 298 B

12345678910111213
  1. /* MBR: one 512-byte section at 0x7C00. mbr.S pads to offset 510 and emits
  2. * the 0xAA55 signature inline, so objcopy -O binary yields exactly 512 bytes. */
  3. ENTRY(_start)
  4. SECTIONS
  5. {
  6. . = 0x7C00;
  7. .boot : {
  8. *(.text)
  9. *(.rodata .rodata.*)
  10. }
  11. /DISCARD/ : { *(.eh_frame) *(.note*) *(.comment) }
  12. }