No multiboot header found issue not found after trying to implement

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
hallooz
Posts: 4
Joined: Sun Jun 22, 2025 10:05 pm

No multiboot header found issue not found after trying to implement

Post by hallooz »

https://github.com/mikhail10101/os-test

I've been working on this for a few days, reading the osdev wiki and watching tutorials on YouTube. More recently, I've been trying to implement paging but now suddenly run into a no multiboot header found error :((

The only files I'm really looking at are boot.S and linker.ld in the kernel/arch/i386 directory. Any help would be appreciated [-o< [-o<
Octocontrabass
Member
Member
Posts: 5873
Joined: Mon Mar 25, 2013 7:01 pm

Re: No multiboot header found issue not found after trying to implement

Post by Octocontrabass »

When you use a default name for a section, like ".text", the assembler automatically assigns attributes like "allocatable" and "executable" to the section. When you use a non-default name for a section, like ".multiboot.text", the assembler does not assign any default attributes.

The "allocatable" attribute tells the linker that the section will be loaded into memory, so it needs to be located in the final binary exactly how the linker script says it should be. Without this attribute, the linker is free to move your Multiboot header somewhere else, because sections that aren't allocatable aren't important.

You can add the "allocatable" and "executable" attributes to a section like this:

Code: Select all

.section .multiboot.text,"ax"
hallooz
Posts: 4
Joined: Sun Jun 22, 2025 10:05 pm

Re: No multiboot header found issue not found after trying to implement

Post by hallooz »

THANK YOU SO MUCH!
Post Reply