From 3adae629e98f9fd256349b291e89e6f63c5e469e Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 12 May 2017 11:47:56 +0200 Subject: sorted out the character constant mess: we have a flat model (with GDT) starting from 0x8000, but the first 2k are stage 2 of the boot loader, so out kernel entry is 0x8400. We have to tell ld that and use 0x8400 instead of 0x8000, otherwise all string constants point to Nirvana! --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 45db0f7..e0dfedb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -19,7 +19,7 @@ boot.bin: boot.asm gdt.asm stage1_functions.asm stage2_functions.asm switch_mode nasm boot.asm -f bin -o boot.bin kernel.bin: kernel.o vga.o port.o port_asm.o string.o stdlib.o - $(LD) -o kernel.bin -n -Ttext 0x8000 --oformat binary \ + $(LD) -o kernel.bin -N -n -Ttext 0x8400 --oformat binary \ kernel.o vga.o port.o port_asm.o string.o stdlib.o magic.bin: magic.asm -- cgit v1.2.3-54-g00ecf