Limine Bare Bones: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content added Content deleted
(Backports from limine-c-template) |
No edit summary |
||
Line 173: | Line 173: | ||
PHDRS |
PHDRS |
||
{ |
{ |
||
requests PT_LOAD FLAGS( |
requests PT_LOAD FLAGS(0x06); /* Write + Read */ |
||
text PT_LOAD FLAGS( |
text PT_LOAD FLAGS(0x05); /* Execute + Read */ |
||
rodata PT_LOAD FLAGS( |
rodata PT_LOAD FLAGS(0x04); /* Read only */ |
||
data PT_LOAD FLAGS( |
data PT_LOAD FLAGS(0x06); /* Write + Read */ |
||
dynamic PT_DYNAMIC FLAGS( |
dynamic PT_DYNAMIC FLAGS(0x06); /* Dynamic PHDR for relocations */ |
||
} |
} |
||
SECTIONS |
SECTIONS |
||
{ |
{ |
||
/* |
/* We wanna be placed in the topmost 2GiB of the address space, for optimisations */ |
||
/* and because that is what the Limine spec mandates. */ |
|||
/* to or above the address 0xffffffff80000000, which marks the beginning of */ |
|||
/* |
/* Any address in this region will do, but often 0xffffffff80000000 is chosen as */ |
||
/* |
/* that is the beginning of the region. */ |
||
. = 0xffffffff80000000; |
|||
/* file of type ET_DYN, which is what we want. */ |
|||
. = 0; |
|||
/* Define a section to contain the Limine requests and assign it to its own PHDR */ |
/* Define a section to contain the Limine requests and assign it to its own PHDR */ |
||
Line 321: | Line 320: | ||
-m elf_x86_64 \ |
-m elf_x86_64 \ |
||
-nostdlib \ |
-nostdlib \ |
||
-static \ |
|||
-pie \ |
-pie \ |
||
--no-dynamic-linker \ |
|||
-z text \ |
-z text \ |
||
-z max-page-size=0x1000 \ |
-z max-page-size=0x1000 \ |
||
Line 383: | Line 380: | ||
# The entry name that will be displayed in the boot menu. |
# The entry name that will be displayed in the boot menu. |
||
:myOS |
:myOS |
||
# We use the Limine boot protocol. |
# We use the Limine boot protocol. |
||
PROTOCOL=limine |
PROTOCOL=limine |
||
⚫ | |||
⚫ | |||
# Path to the kernel to boot. boot:/// represents the partition on which limine.cfg is located. |
# Path to the kernel to boot. boot:/// represents the partition on which limine.cfg is located. |
||
KERNEL_PATH=boot:///boot/myos |
KERNEL_PATH=boot:///boot/myos |
||
# Same thing, but |
# Same thing, but with KASLR. |
||
:myOS ( |
:myOS (with KASLR) |
||
PROTOCOL=limine |
PROTOCOL=limine |
||
⚫ | |||
⚫ | |||
KERNEL_PATH=boot:///boot/myos |
KERNEL_PATH=boot:///boot/myos |