booting elf64 image

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

booting elf64 image

Post by 13postures »

Hello gang,

I'm trying to make an experimental kernel multiboot compatible on amd64 and make it run in long mode. This kernel currently compiles and boots on i386 using Grub Legacy. However, Grub Legacy cannot boot elf64 images as this thread also states http://www.osdev.org/phpBB2/viewtopic.p ... ight=elf64.

Does GRUB2 support elf64 images without problems??


Thanks
13postures
Posts: 13
Joined: Sat Apr 28, 2007 1:57 am

Post by 13postures »

After some searching and inquiring at the appropriate lists, i found out that neither grub nor grub2 can load an elf64 image. Moving on...
User avatar
mystran
Member
Member
Posts: 670
Joined: Thu Mar 08, 2007 11:08 am

Post by mystran »

You could load elf32 binary, and an elf64 module for it, and have the elf32 binary setup an environment where you can switch to long mode, then have rest of the kernel in the elf64 module. That should work.

I don't know much about 64 though, so can't help with the details.
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Post by quok »

I looked at the sources in grub2's cvs today. It looks like it supports loading elf64 images now, at least on i386.
Post Reply