fixed build script by adding compiler flags -fno-pie and -fno-pic

This commit is contained in:
Gregory Kenneth Bowne 2024-09-02 01:36:45 -07:00
parent 2f55de96a2
commit d8eaa406e7

2
build.sh Normal file → Executable file
View File

@ -22,7 +22,7 @@ nasm -f elf32 boot.asm -o boot.o
# Compile and link the kernel # Compile and link the kernel
echo "Compiling and linking kernel..." echo "Compiling and linking kernel..."
gcc -m32 -ffreestanding -nostdlib kernel.c boot.o -o kernel.bin -T linker.ld gcc -m32 -ffreestanding -nostdlib -fno-pic -fno-pie kernel.c boot.o -o kernel.bin -T linker.ld
# Check if compilation was successful # Check if compilation was successful
if [ -f kernel.bin ]; then if [ -f kernel.bin ]; then