diff options
| author | kotorifan <kotorifan05@gmail.com> | 2026-02-02 14:45:36 +0100 |
|---|---|---|
| committer | kotorifan <kotorifan05@gmail.com> | 2026-02-04 09:01:10 +0100 |
| commit | 60b93287592f6d6e1b3157c7f60e1277fb8bb3ba (patch) | |
| tree | c47b5febb178ea56af5cd383b4453d8c72396783 /linker.ld | |
| parent | 929e57f0b5c8a49a35f8b8cab3c2eae32817a3dd (diff) | |
| download | kotori-os-60b93287592f6d6e1b3157c7f60e1277fb8bb3ba.tar.gz | |
Added some stuff
Diffstat (limited to 'linker.ld')
| -rw-r--r-- | linker.ld | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/linker.ld b/linker.ld new file mode 100644 index 0000000..0f33778 --- /dev/null +++ b/linker.ld @@ -0,0 +1,21 @@ +MEMORY +{ + boot_sector (rwx) : ORIGIN = 0x7c00, LENGTH = 512 + stage2 (rwx) : ORIGIN = 0x7e00, LENGTH = 512 + kernel (rwx) : ORIGIN = 0x8000, LENGTH = 0x10000 +} + +ENTRY(_start) +SECTIONS +{ + .boot_sector : { *(.boot_sector); } > boot_sector + .stage2 : { *(.stage2); } > stage2 + .text : { *(.text); } > kernel + .data : { *(.data); } > kernel + .rodata : { *(.rodata); } > kernel + .bss : + { + *(.bss) + *(COMMON) + } > kernel +} |
