grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: [PATCH] elf: accept elf files without section header table


From: Mathieu Mirmont
Subject: Re: Re: [PATCH] elf: accept elf files without section header table
Date: Wed, 15 May 2024 16:35:38 +0000

> Hey. Can you describe what exactly are you trying to solve?

Sure. Sorry for the delay it was the kids holidays and I wasn't subscribed to the mailing list.

So we are building an OS that uses the seL4 microkernel and follows the multiboot2 specifications. The OS is fairly static and all components (kernel and user-space tasks) must be loaded at fixed physical addresses before starting the kernel. Everything is bundled as a single ELF file with multiple segments that grub used to load at the right location.

There have been changes in the grub ELF loader that make it reject ELF files that don't have any section, which in our case is a regression. Our ELF file does not have any section and does not include a section header table. This is perfectly legal as per elf(5) and is correctly parsed by readelf and objdump.

This simple patch makes grub accept ELF files without section header and in this case just returns 0 sections found.

Cheers,

--
Mathieu
Mirmont <mat+grub@neutrality.ch>

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]