mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 02:16:58 +00:00
Initial commit
This commit is contained in:
43
linker.ld
Normal file
43
linker.ld
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Tell the linker that we want an x86_64 ELF64 output file */
|
||||
OUTPUT_FORMAT(elf64-x86-64)
|
||||
OUTPUT_ARCH(i386:x86-64)
|
||||
|
||||
/* We want the symbol _start to be our entry point */
|
||||
ENTRY(_start)
|
||||
|
||||
/* Define the memory layout for the kernel */
|
||||
SECTIONS
|
||||
{
|
||||
/* We want to be loaded in the upper half of memory */
|
||||
. = 0xffffffff80000000;
|
||||
|
||||
.text : {
|
||||
*(.text*)
|
||||
}
|
||||
|
||||
.rodata : {
|
||||
*(.rodata*)
|
||||
}
|
||||
|
||||
.data : {
|
||||
*(.data*)
|
||||
}
|
||||
|
||||
.bss : {
|
||||
*(COMMON)
|
||||
*(.bss*)
|
||||
}
|
||||
|
||||
/* Limine requests section */
|
||||
.requests : {
|
||||
KEEP(*(.requests_start))
|
||||
KEEP(*(.requests))
|
||||
KEEP(*(.requests_end))
|
||||
}
|
||||
|
||||
/* Discard unnecessary sections */
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame)
|
||||
*(.note .note.*)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user