Error in multiboot 2 spec

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
songziming
Member
Member
Posts: 71
Joined: Fri Jun 28, 2013 1:48 am
Contact:

Error in multiboot 2 spec

Post 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.
Reinventing the Wheel, code: https://github.com/songziming/wheel
User avatar
eekee
Member
Member
Posts: 891
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Error in multiboot 2 spec

Post 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.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
forgetme11
Posts: 7
Joined: Mon Dec 09, 2024 12:29 am

Re: Error in multiboot 2 spec

Post by forgetme11 »

LOL this is insane, wish I had found this post sooner, better off writing a bootloader than putting up with this nonsense.
Post Reply