[SOLVED] Tutorial won't compile
Posted: Thu Apr 22, 2010 3:56 pm
I was trying to compile the "Bare Bones" tutorial from the Wiki and I can't get it to compile. My desktop is 64-bit Arch Linux.
Anyway, this is what happens:
It looks like ld is trying to produce a 64-bit executable. What should I do?
Anyway, this is what happens:
Code: Select all
$ nasm -f elf32 -o loader.o loader.s
$ gcc -o kernel.o -c kernel.c -Wall -Wextra -nostdlib -nostartfiles -nodefaultlibs -m32
kernel.c: In function ‘kernel_main’:
kernel.c:1: warning: unused parameter ‘mbd’
$ ld -T linker.ld -o kernel.bin loader.o kernel.o
ld: i386 architecture of input file `loader.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `kernel.o' is incompatible with i386:x86-64 output