Page 1 of 1

Error in multiboot 2 spec

Posted: Fri Aug 25, 2023 12:25 am
by songziming
It seems elf-symbols info tag format is incompliant.

Current version of multiboot2 spec: https://www.gnu.org/software/grub/manua ... 02dSymbols

In section 3.6.7, the format of elf-symbols tag is:

Code: Select all

        +-------------------+
u32     | type = 9          |
u32     | size              |
u16     | num               |
u16     | entsize           |
u16     | shndx             |
u16     | reserved          |
varies  | section headers   |
        +-------------------+
In section 4.4.1, content of multiboot2.h:

Code: Select all

struct multiboot_tag_elf_sections
{
  multiboot_uint32_t type;
  multiboot_uint32_t size;
  multiboot_uint32_t num;
  multiboot_uint32_t entsize;
  multiboot_uint32_t shndx;
  char sections[0];
};
I also checked grub2 repo, the latter version is correct.

Re: Error in multiboot 2 spec

Posted: Fri Aug 25, 2023 12:25 pm
by eekee
This is not the only place where Grub headers differ from the multiboot2 standard, the framebuffer info structure also differs. You just have to take the headers as canonical and the standard as more of a general idea.

Re: Error in multiboot 2 spec

Posted: Tue Dec 10, 2024 10:11 pm
by forgetme11
LOL this is insane, wish I had found this post sooner, better off writing a bootloader than putting up with this nonsense.