kernel/kernel/kernel.ld

45 lines
758 B
Plaintext
Raw Normal View History

2023-01-25 00:17:20 +00:00
OUTPUT_FORMAT(elf64-x86-64)
ENTRY(_start)
PHDRS
{
text PT_LOAD FLAGS((1 << 0) | (1 << 2)); /* READ ----- EXEC */
rodata PT_LOAD FLAGS((1 << 2)); /* READ ----- ---- */
data PT_LOAD FLAGS((1 << 1) | (1 << 2)); /* READ WRITE ---- */
}
SECTIONS
{
. = 0xFFFFFFFF80000000;
_kernel_start = .;
.text : ALIGN(0x1000)
{
*(.text .text.*)
} :text
.rodata : ALIGN(0x1000)
{
*(.rodata .rodata.*)
} :rodata
.data : ALIGN(0x1000)
{
*(.data .data.*)
} :data
.bss : ALIGN(0x1000)
{
*(COMMON)
*(.bss .bss.*)
} :data
/DISCARD/ :
{
*(.eh_frame)
*(.note .note.*)
}
2023-01-25 11:22:27 +00:00
_kernel_end = .;
2023-01-25 00:17:20 +00:00
}