Page 1 of 1

GCC and linking

Posted: Tue Feb 25, 2003 12:39 pm
by Thunder
Hello again i compile code:
gcc -c kernel.c
ld kernel.o -o kernel.sys -oformat binary -Ttext 0x100000

But GRUB doesnt load it, it should be an elf format how i should input eld definition into my code?

Re:GCC and linking

Posted: Tue Feb 25, 2003 1:44 pm
by Whatever5k
You seem to be linking to binary - if so, you need to use the aout kludge, see [1].
I recommend you use a linker script that links to ELF, see [1] again.

1. http://osdev.berlios.de/grub.html