From 11607b18e81a59b6759cef1d8b6751ac50375aa9 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sun, 15 Aug 2021 21:00:59 +0200 Subject: [PATCH] Makefile fix --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e709b0c..6522885 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,10 @@ os-image: bootloader.bin kernel.bin cat $^ > os-image kernel.bin: kernel_entry.o kernel.o - ld -o kernel.bin -Ttext 0x1000 $^ --oformat binary + gcc -o kernel.bin $^ -Wl,--oformat=binary -ffreestanding -nostdlib -shared -Ttext 0x1000 -m32 kernel.o : src/kernel/kernel.c - gcc -ffreestanding -c $< -o $@ + gcc -fno-pie -m32 -Os -ffreestanding -c $< -o $@ kernel_entry.o : src/kernel/kernel_entry.asm nasm $< -f elf -o $@