OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Apr 28, 2024 4:11 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Error in multiboot 2 spec
PostPosted: Fri Aug 25, 2023 12:25 am 
Offline
Member
Member

Joined: Fri Jun 28, 2013 1:48 am
Posts: 65
It seems elf-symbols info tag format is incompliant.

Current version of multiboot2 spec: https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html#ELF_002dSymbols

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

Code:
        +-------------------+
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:
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


Top
 Profile  
 
 Post subject: Re: Error in multiboot 2 spec
PostPosted: Fri Aug 25, 2023 12:25 pm 
Offline
Member
Member
User avatar

Joined: Mon May 22, 2017 5:56 am
Posts: 817
Location: Hyperspace
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: akasei, Google [Bot], HonokaNo and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group