Re:building OS from scratch (HELP ME .......)
Posted: Thu Dec 18, 2003 8:19 am
okay ... entering tutor mode.neuRopac wrote: sir ,
thank you for your quick reply ....
but i tried to understand what u've said,but in vain . . . . . . . .::)
could u pls explain me that. i'm really tensed.
waiting for the earliest reply from you . . . . . . . . ::)
You need to know that there are many formats for executable files, like COFF, ELF, AOUT, OBJ, PE, etc. all those are standards and informations about them are available on wotsit.
GRUB knows the ELF format and can load it correctly, but it doesn't know about other file formats. However, it does understand flat binary files that have the so-called "Multiboot header" included (look at the GRUB documentation if you need), so by asking -faout instead of -felf, you're actually generating a .bin file that GRUB will not understand correctly.
From there, you have two options:
- either you're working under windows, which uses PE/COFF as a native executable format, and your compiler/linker does not know anything about ELF formats, in which case you need to download another compiler toolchain that *will* support it. Don't ask where, i dunno.
- either you're working under linux, which uses ELF as native executable format (at least since kernel 2.2). However, the 'elf' target itself is not valid under linux. There are many variants of ELF, depending on whether you're on a 32 or 64 bits equipment or whether you're on big-endian or little-endian CPU. As there are chances you're on an Intel Pentium based system, "elf32-i386" should be the target you must use.
hope i made myself clearer this time ...