If it's not a UEFI binary, then it's not a UKI.
assert(pe_header);
assert(sections || le16toh(pe_header->pe.NumberOfSections) == 0);
+ if (le16toh(pe_header->optional.Subsystem) != IMAGE_SUBSYSTEM_EFI_APPLICATION)
+ return false;
+
return
pe_header_find_section(pe_header, sections, ".osrel") &&
pe_header_find_section(pe_header, sections, ".linux") &&
le32_t Characteristics;
} IMAGE_SECTION_HEADER;
+#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
+
bool pe_header_is_64bit(const PeHeader *h);
#define PE_HEADER_OPTIONAL_FIELD(h, field) \