Limine Bare Bones: Difference between revisions

no edit summary
[unchecked revision][unchecked revision]
(Backports from limine-c-template)
No edit summary
Line 173:
PHDRS
{
requests PT_LOAD FLAGS((1 << 10x06) | (1 << 2)) ; /* Write + Read */
text PT_LOAD FLAGS((1 << 00x05) | (1 << 2)) ; /* Execute + Read */
rodata PT_LOAD FLAGS((1 << 20x04)) ; /* Read only */
data PT_LOAD FLAGS((1 << 10x06) | (1 << 2)) ; /* Write + Read */
dynamic PT_DYNAMIC FLAGS((1 << 10x06) | (1 << 2)) ; /* Dynamic PHDR for relocations */
}
 
SECTIONS
{
/* TheWe bootloaderwanna willbe relocateplaced relocatablein kernelsthe withtopmost a2GiB baseof the address ofspace, for 0optimisations */
/* and because that is what the Limine spec mandates. */
/* to or above the address 0xffffffff80000000, which marks the beginning of */
/* theAny top-mostaddress 2GiBin this region ofwill virtualdo, addressbut often 0xffffffff80000000 is chosen space.as */
/* Markingthat is the basebeginning address as 0 also makesof the GNU linker (ldregion.bfd) emit an ELF */
. = 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 */
Line 321 ⟶ 320:
-m elf_x86_64 \
-nostdlib \
-static \
-pie \
--no-dynamic-linker \
-z text \
-z max-page-size=0x1000 \
Line 383 ⟶ 380:
 
# The entry name that will be displayed in the boot menu.
:myOS (KASLR on)
# We use the Limine boot protocol.
PROTOCOL=limine
 
# Disable KASLR (it is enabled by default for relocatable kernels)
KASLR=no
 
# Path to the kernel to boot. boot:/// represents the partition on which limine.cfg is located.
KERNEL_PATH=boot:///boot/myos
 
# Same thing, but withoutwith KASLR.
:myOS (KASLRwith offKASLR)
PROTOCOL=limine
 
# Disable KASLR (it is enabled by default for relocatable kernels)
KASLR=no
 
KERNEL_PATH=boot:///boot/myos
Anonymous user