init version

This commit is contained in:
2026-02-20 22:17:31 +01:00
commit c4c1a4350c
28 changed files with 755 additions and 0 deletions

58
.cargo/linker-mbr-i386.ld Normal file
View File

@@ -0,0 +1,58 @@
OUTPUT_FORMAT("binary")
ENTRY(_start)
/* props to https://github.com/rust-osdev/bootloader/blob/main/bios/boot_sector/boot-sector-link.ld */
SECTIONS {
. = 0x500;
_stack_start = .;
. = 0x7c00;
_stack_end = .;
_mbr_start = .;
.boot :
{
*(.boot .boot.*)
}
.text :
{
*(.text .text.*)
}
.rodata :
{
*(.rodata .rodata.*)
}
.data :
{
*(.rodata .rodata.*)
*(.data .data.*)
*(.got .got.*)
}
_mbr_end = .;
. = 0x7c00 + 446;
_partition_table = .;
.partition_table :
{
/* partition table entry 0 */
QUAD(0)
QUAD(0)
/* partition table entry 1 */
QUAD(0)
QUAD(0)
/* partition table entry 2 */
QUAD(0)
QUAD(0)
/* partition table entry 3 */
QUAD(0)
QUAD(0)
}
. = 0x7c00 + 510;
.magic_number :
{
SHORT(0xaa55) /* magic number for bootable disk */
}
_second_stage_start = .;
}