Files
opencoreC/config/linker.ld
T
RarDog eed05c1eca feat(boot+shell): add bootable disk image, unified scheduler and interactive user-space shell
- Implement Limine v8 boot protocol requests in dedicated PT_LOAD RW segment
- Configure IOPL=3 and SSE in arch setup for Ring 3 drivers and libc
- Unify scheduler context switching via switch_to and preempt_tick
- Support dual-source keyboard/serial input in sys_key_read
- Add automated 'make image' and 'make run' targets for instant QEMU launch
- Complete interactive UNIX-like shell (osh) with built-in commands & ramdisk
2026-09-02 19:47:57 +03:00

62 lines
1.2 KiB
Plaintext

/* opencoreC - Higher-Half x86_64 Kernel Linker Script */
OUTPUT_FORMAT(elf64-x86-64)
OUTPUT_ARCH(i386:x86-64)
ENTRY(_start)
PHDRS
{
text PT_LOAD FLAGS((1 << 0) | (1 << 2)); /* Execute | Read */
rodata PT_LOAD FLAGS((1 << 2)); /* Read Only */
data PT_LOAD FLAGS((1 << 1) | (1 << 2)); /* Write | Read */
}
SECTIONS
{
/* Higher-half virtual base: 0xffffffff80000000 (-2 GiB) */
. = 0xffffffff80000000;
.text : {
*(.text .text.*)
} :text
. = ALIGN(CONSTANT(MAXPAGESIZE));
.rodata : {
*(.rodata .rodata.*)
} :rodata
. = ALIGN(CONSTANT(MAXPAGESIZE));
/* Limine requests: must be in a WRITABLE segment so bootloader can fill responses */
.limine_base_revision : {
KEEP(*(.limine_base_revision))
} :data
.limine_requests_start : {
KEEP(*(.limine_requests_start))
} :data
.limine_requests : {
KEEP(*(.limine_requests))
} :data
.limine_requests_end : {
KEEP(*(.limine_requests_end))
} :data
.data : {
*(.data .data.*)
} :data
.bss : {
*(.bss .bss.*)
*(COMMON)
} :data
/DISCARD/ : {
*(.eh_frame)
*(.note .note.*)
*(.comment)
}
}