The operating system of my pc is Ubuntu 20.10 64 bit.I am trying to create a 32bit kernel but when I go to run the makefile:
all: runkernel.bin: kernel_entry.o kernel.o ld -m elf_i386 -o $@ -Ttext 0x1000 $^ --oformat binarykernel_entry.o: kernel_entry.asm nasm $< -f elf32 -o $@kernel.o: kernel.c gcc -m32 -fno-pie -ffreestanding -c $< -o $@bootsector.bin: bootsector.asm nasm $< -f bin -o $@os-image.bin: bootsector.bin kernel.bin cat $^ > $@run: os-image.bin qemu-system-i386 -fda $<clean: $(RM) *.bin *.o *.dis
I get the following error.Can someone help me?
ld -m elf_i386 -o kernel.bin -Ttext 0x1000 kernel_entry.o kernel.o --oformat binaryld: attenzione: impossibile trovare il simbolo d'ingresso _start; ripristinato il predefinito 0000000000001000ld: kernel.o: in function `main':kernel.c:(.text+0xc): undefined reference to `_GLOBAL_OFFSET_TABLE_'make: *** [Makefile:4: kernel.bin] Errore 1```