elf64 loader design

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
13postures
Posts: 13
Joined: Sat Apr 28, 2007 1:57 am

elf64 loader design

Post by 13postures »

Hello all,

This is a call for brainstorming!

I am in the process of deciding how to load my 64-bit kernel by grub. As you already know, grub (legacy) cannot load elf64 images. So, i have to do some magic to get it to load my kernel.

Mystran proposed to load an elf32 binary, and an elf64 module for it, and have the elf32 binary setup an environment where i can switch to long mode. Then i can have the rest of the kernel in the elf64 module. This might mean that i could split my kernel in two parts, one 32-bit and one 64-bit. Or it could mean that i should use a 32-bit version of my kernel to set everything up and then call the 64-bit version to take over. However, those approaches don't sound very minimalistic.

What do you think is the best (that means SIMPLEST) approach to load a 64-bit kernel if a)i want to use grub and b)i want to modify my kernel as little as possible?

Thanks in advance!
Post Reply