Multiboot Header - Has the magic number changed?

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.
User avatar
XanClic
Member
Member
Posts: 138
Joined: Wed Feb 13, 2008 9:38 am

Re: Multiboot Header - Has the magic number changed?

Post by XanClic »

Love4Boobies wrote:It is not a mistake to have the multiboot header in the .text section, it is in fact the most common approach. You needn't be afraid that your header will end up in some random place because you basically end up with the assembly code generated from the C file appended to the multiboot header part. Having a separate section is inconsistent with many executable formats (e.g., a.out).
If you are using ELF, don't rely on all that. When I started using C as the language for my operating systems, I used NASM instead of FASM. But then I tried to switch back to FASM (together with C), that failed, because the linker put the FASM code behind the C code (I still don't know why the same thing didn't happen with NASM). Thus I had to create a new section and everything worked fine.
So I can't recommend putting the multiboot header into the text section.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Multiboot Header - Has the magic number changed?

Post by Love4Boobies »

That's not normal. I'm guessing you did something wrong and didn't see it. But having a separate section is no problem, of course.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Multiboot Header - Has the magic number changed?

Post by jal »

quok wrote:The new multiboot draft says the new magic number is 0x36d76289.
That's the magic value returned in EAX. The header magic value is supposedly 0xe85250d6.


JAL
Post Reply