Page 1 of 1

No multiboot header found issue not found after trying to implement

Posted: Sun Jun 22, 2025 10:12 pm
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<

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

Posted: Sun Jun 22, 2025 11:23 pm
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"

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

Posted: Mon Jun 23, 2025 10:25 pm
by hallooz
THANK YOU SO MUCH!