From e9105d34986ffda1d6d713c2f4a93454e639556e Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 30 Jan 2025 01:51:05 +0000 Subject: [PATCH] pe: do not warn about .initrd addons We now support them, so stop warning about them. (cherry picked from commit f6928e6b5d59fd6b0dc34d338be1cd427c1d97d5) --- src/shared/pe-binary.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/pe-binary.c b/src/shared/pe-binary.c index c50aad18f3..173c5adf90 100644 --- a/src/shared/pe-binary.c +++ b/src/shared/pe-binary.c @@ -272,10 +272,11 @@ bool pe_is_addon(const PeHeader *pe_header, const IMAGE_SECTION_HEADER *sections if (le16toh(pe_header->optional.Subsystem) != IMAGE_SUBSYSTEM_EFI_APPLICATION) return false; - /* Add-ons do not have a Linux kernel, but do have either .cmdline or .dtb (currently) */ + /* Add-ons do not have a Linux kernel, but do have one of .cmdline, .dtb, .initrd or .ucode (currently) */ return !pe_header_find_section(pe_header, sections, ".linux") && (pe_header_find_section(pe_header, sections, ".cmdline") || pe_header_find_section(pe_header, sections, ".dtb") || + pe_header_find_section(pe_header, sections, ".initrd") || pe_header_find_section(pe_header, sections, ".ucode")); }