On Mon, Jan 12, 2026 at 02:06:37PM +0100, Ahmad Fatoum wrote:
> On 1/8/26 4:50 PM, Sascha Hauer wrote:
> > elf_open_binary() returns a dynamically allocated struct elf_image *. We
> > do not have malloc in the PBL, so for better PBL support create
> > elf_open_binary_into() which takes a struct elf_image * as argument.
> 
> Strictly speaking, we have the <linux/mm/decompress.h> allocator and as
> this runs after decompression, the early malloc area is already
> allocated too, but I don't feel strongly about it.

This is only implemented for arm, mips and riscv. I don't think that
it's worth implementing for the other architectures just to get a single
piece of memory that can easily be statically allocated.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to