diff options
author | dzwdz | 2021-07-10 18:12:46 +0200 |
---|---|---|
committer | dzwdz | 2021-07-10 18:12:46 +0200 |
commit | 49a9de571ad0c604cb569d46d514f25bdc45d8ca (patch) | |
tree | 91d0de09529a6d286877451f4909116edd552ba1 | |
parent | 1bf5e324005ce7122a195af106cec656960648dc (diff) |
allocate the initial stack directly in linker.ld
IMO it's cleaner this way.
I wanted to put it just under 1M, but it turns out that it isn't
accessible at boot in QEMU.
-rw-r--r-- | linker.ld | 4 | ||||
-rw-r--r-- | src/arch/i386/boot.s | 10 |
2 files changed, 4 insertions, 10 deletions
@@ -20,6 +20,10 @@ SECTIONS { *(COMMON) *(.bss) + + stack_bottom = .; + . += 16K; + stack_top = .; } _kernel_end = (. + 0xFFF) & ~0xFFF; /* aligned to 4K */ } diff --git a/src/arch/i386/boot.s b/src/arch/i386/boot.s index 74ec312..2578e87 100644 --- a/src/arch/i386/boot.s +++ b/src/arch/i386/boot.s @@ -1,13 +1,3 @@ -/* a lil stack TODO move to linker.ld */ -.section .bss -.global stack_top -.type stack_top, @object -.align 16 -stack_bottom: -.skip 16384 -stack_top: - - .section .text .global _start .type _start, @function |