Files
MontaukOS/template/link.ld
T

44 lines
596 B
Plaintext

/*
* link.ld
* Linker script for MontaukOS userspace programs
* Copyright (c) 2025 Daniel Hammer
*
* Programs are loaded at a standard user-space address.
*/
OUTPUT_FORMAT(elf64-x86-64)
ENTRY(_start)
SECTIONS
{
. = 0x400000;
.text : {
*(.text .text.*)
}
. = ALIGN(4096);
.rodata : {
*(.rodata .rodata.*)
}
. = ALIGN(4096);
.data : {
*(.data .data.*)
}
.bss : {
*(.bss .bss.*)
*(COMMON)
}
/DISCARD/ : {
*(.eh_frame*)
*(.note .note.*)
*(.comment*)
}
}