From: Jan Janssen Date: Sun, 30 Jul 2023 19:05:24 +0000 (+0200) Subject: stub: Also reserve sections for EFI stub X-Git-Tag: v255-rc1~876^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0bbe3248551e6cb02ba62559e7ff87b0a27f789;p=thirdparty%2Fsystemd.git stub: Also reserve sections for EFI stub The stub image may not have enough sections to cause enough PE header space to be free for later expansion. Given that the stub is guaranteed to be expanded we should always reserve enough sections for it. This also bumps the reservation to 15. It doesn't add more space compared to current builds but it more closely reflects the amount of sections that a UKI could have in total if all optional sections are used. Fixes: #28593 --- diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index e99bdb87485..0d0b8265a80 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -351,7 +351,7 @@ foreach efi_elf_binary : efi_elf_binaries name += name.startswith('systemd-boot') ? '.efi' : '.efi.stub' # For the addon, given it's empty, we need to explicitly reserve space in the header to account for # the sections that ukify will add. - minimum_sections = name.startswith('addon') ? '7' : '0' + minimum_sections = name.endswith('.stub') ? '15' : '0' exe = custom_target( name, output : name,