ELF kernel

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pini

ELF kernel

Post by pini »

If I compile my kernel in ELF32-i386 format, how can I boot it ?
My boot loader doesn't work with non-flat binary formats.

Can anyone give a piece of code for loading an elf-kernel in protected mode ?
Slasher

Re:ELF kernel

Post by Slasher »

hi,
theres a file elf.pdf. it describes the ELF file format. to load an ELF file you have to work with the format ie READ ABOUT IT and learn what the header and other sections in the FORMAT do then write code to use them in the way you want. Use google with 'elf file format pdf' or use this
http://www.google.com/search?hl=en&ie=U ... format+pdf
pini

Re:ELF kernel

Post by pini »

You'are right : I must read the ELF-specs.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:ELF kernel

Post by Pype.Clicker »

i guess Linux kernel should have what you wish, but i dunno where (some find | grep "elf" in /usr/src/linux might help).
I also have a small documentation about ELF format and a converter tool between ELF files and Clicker native modules format, which you could use as a base to write a simple ELF loader. . .

Hope this will help
pini

Re:ELF kernel

Post by pini »

Thanks, I think the code of your converter will be extremly useful :D
Schol-R-LEA

Re:ELF kernel

Post by Schol-R-LEA »

Addtional details about ELF format can be found at the OSD site's executable formats page; Linkers and Loaders also covers ELF in detail. You may also want to look at how GRUB handles ELF files, though I don't know how helpful that would be.
K.J.

Re:ELF kernel

Post by K.J. »

GRUB can load ELF, source code is here:
http://savannah.gnu.org/cvs/?group=grub

K.J.
Post Reply