aboutsummaryrefslogtreecommitdiffhomepage
path: root/arch/x86/mbr/mbr.ld
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2024-12-21 21:02:11 +0000
committerjohannst <johannst@users.noreply.github.com>2024-12-21 21:02:11 +0000
commit267bb0d3d2b7ba892f8f5d88f14f1be1aac0df11 (patch)
tree58d2bc6b702571fc6cce341d1b744f72e6bc1bf2 /arch/x86/mbr/mbr.ld
parent7abccf12ab6bf023eb0f23f42f2979642194f122 (diff)
downloadnotes-267bb0d3d2b7ba892f8f5d88f14f1be1aac0df11.tar.gz
notes-267bb0d3d2b7ba892f8f5d88f14f1be1aac0df11.zip
deploy: f8221e81b9752548d26675111cffca1947c46b68
Diffstat (limited to 'arch/x86/mbr/mbr.ld')
-rw-r--r--arch/x86/mbr/mbr.ld11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/mbr/mbr.ld b/arch/x86/mbr/mbr.ld
new file mode 100644
index 0000000..46d8a14
--- /dev/null
+++ b/arch/x86/mbr/mbr.ld
@@ -0,0 +1,11 @@
+OUTPUT_FORMAT(elf32-i386)
+OUTPUT_ARCH(i386)
+
+SECTIONS {
+ . = 0x7c00;
+ .boot : { *(.boot) }
+ _boot_end = .;
+ /DISCARD/ : { *(.*) }
+
+ ASSERT(_boot_end - 0x7c00 == 512, "boot sector must be exact 512 bytes")
+}