If you are new to OS Development, plan on spending some time here first before going into the other forums.
3 posts • Page 1 of 1
I would like to ask why do we have to(or choose to) compile kernel with pe or elf formats and we don't just compile it as flat binary format(pure binary). What are the steps required to compile and load kernel as elf format?
Well, lets think for a moment. Compiling as a flat binary would be nice, wouldn't it... We could just jump to the beginning of the file and start executing. Then again, we would be throwing away the benefits that PE's and ELF's give. You wouldn't be able to do any dynamic linking, as there wouldn't be any IAT's... long story short. You don't HAVE to, but it gives a useful, well defined, and easy to work with format for executable files.