From 353647418912b5b6b94473b15bee312ddc4d64a9 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 25 Jan 2023 22:05:35 +0100 Subject: kernel: move /mem/alloc to /malloc and linker.ld to arch/amd64/ --- src/kernel/arch/amd64/linker.ld | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/kernel/arch/amd64/linker.ld (limited to 'src/kernel/arch/amd64/linker.ld') diff --git a/src/kernel/arch/amd64/linker.ld b/src/kernel/arch/amd64/linker.ld new file mode 100644 index 0000000..a910d4e --- /dev/null +++ b/src/kernel/arch/amd64/linker.ld @@ -0,0 +1,42 @@ +ENTRY(_start) + +SECTIONS +{ + . = 0; + .shared BLOCK(4K) : ALIGN(4K) + { + *(.multiboot) + *(.shared) + _shared_len = .; + } + + . = 1M; + .text BLOCK(4K) : ALIGN(4K) + { + _kern_start = .; + *(.text) + } + .rodata BLOCK(4K) : ALIGN(4K) + { + *(.rodata) + } + .data BLOCK(4K) : ALIGN(4K) + { + *(.data) + } + _data_end = .; + .bss BLOCK(4K) : ALIGN(4K) + { + *(COMMON) + *(.bss) + + . += 16K; + _isr_big_stack = .; + + . += 16K; + _stack_top = .; + } + _bss_end = (. + 0xFFF) & ~0xFFF; /* aligned to 4K */ + pbitmap = _bss_end; + pbitmap_start = _bss_end; +} -- cgit v1.2.3