I am trying to complie my 'os' so that i can boot it from grub, i am using djgpp, nasm etc. The problem is when i try to link the compiled assembly file and the C file. I use the following commands (in dos shell):
nasm -f elf -o start.o start.asm
gcc -c -o main.o main.c
ld -T linker.ld -o myos.bin main.o start.o
The linker script is tryin to output in elf32-i386 format, but ld dosent seem to like this, i have read that you need to get source code to edit for the ld program!!? there must be an easier way!? has no one already done this?
thanks in advance for any help, i would really like to get my os booted, it would be a good start!!
target elf32-i386 not found
RE:target elf32-i386 not found
The DJGPP linker can't make ELF files. Fortunately, GRUB will load non-ELF kernels if you use the "aout kludge". This is fairly simple; just add 5 extra fields to the Multiboot header.
http://www.washingdishes.freeuk.com/grubtut.html
http://my.execpc.com/~geezer/osd/boot/grub-how.txt
Why does everyone thinks GRUB works only with ELF? Is there a website out there with bad information on it?
http://www.washingdishes.freeuk.com/grubtut.html
http://my.execpc.com/~geezer/osd/boot/grub-how.txt
Why does everyone thinks GRUB works only with ELF? Is there a website out there with bad information on it?
RE:target elf32-i386 not found
thanks, but i have found an ld-elf tool, that can link elf files.
i have tried with those links before nd had no luck
but this works neway, so thank you very much for your help.
i have tried with those links before nd had no luck
but this works neway, so thank you very much for your help.