Architecture of i386 input file is incompatible with i386:x86-64

后端 未结 4 647
不思量自难忘°
不思量自难忘° 2020-12-22 22:42

I\'m trying to create a simple kernel using Ubuntu. In the terminal I typed

ld -Ttext 0x1000 -o kernel.bin loader.o main.o Video.o

But I got

4条回答
  •  一个人的身影
    2020-12-22 23:21

    Use 64 bits instead of 32 for your loader and compile it with the following command:

    nasm -f elf64 loader.asm -o loader.o
    

    This should solve your error

提交回复
热议问题