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_002dSymbolsIn 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.