From 5d3179d0e2c3915af65dedef0952672220ac4714 Mon Sep 17 00:00:00 2001 From: Alexey Gavrilov Date: Sat, 10 May 2025 16:04:55 +0700 Subject: Kheap section + metadata --- kernel/linker.ld | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'kernel/linker.ld') diff --git a/kernel/linker.ld b/kernel/linker.ld index ae4d98d..abee596 100644 --- a/kernel/linker.ld +++ b/kernel/linker.ld @@ -6,28 +6,44 @@ SECTIONS .multiboot : { + _startMultiboot = .; *(.multiboot) + _endMultiboot = .; } + .text BLOCK(4K) : ALIGN(4K) { + _startText = .; *(.text) - *(.eh_frame) - *(.ctors) + _endText = .; } .rodata BLOCK(4K) : ALIGN(4k) { + _startRodata = .; *(.rodata) + _endRodata = .; } .data BLOCK(4K) : ALIGN(4K) { + _startData = .; *(.data) + _endData = .; } - .bss BLOCK(4K) : ALIGN(4K) + .bss BLOCK(16K) : ALIGN(16K) { - *(COMMON) + _startBss = .; *(.bss) + _endBss = .; } + + .kheap BLOCK(4k) : ALIGN(4k) + { + _startKheap = .; + *(.kheap) + _endKheap = .; + } + } -- cgit v1.2.3