Forgot to add this check to fastPathSign

This commit is contained in:
alfiecg24 2024-02-09 19:58:29 +00:00
parent 3913abfd8d
commit 09957974ba
1 changed files with 10 additions and 4 deletions

View File

@ -6,6 +6,8 @@
#include "Host.h" #include "Host.h"
#include <copyfile.h> #include <copyfile.h>
#define CPU_SUBTYPE_ARM64E_ABI_V2 0x80000000
char *extract_preferred_slice(const char *fatPath) char *extract_preferred_slice(const char *fatPath)
{ {
FAT *fat = fat_init_from_path(fatPath); FAT *fat = fat_init_from_path(fatPath);
@ -20,11 +22,15 @@ char *extract_preferred_slice(const char *fatPath)
// If that fails, check for regular arm64 // If that fails, check for regular arm64
macho = fat_find_slice(fat, CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64_ALL); macho = fat_find_slice(fat, CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64_ALL);
if (!macho) { if (!macho) {
// If that fails, check for arm64e // If that fails, check for arm64e with ABI v2
macho = fat_find_slice(fat, CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64E); macho = fat_find_slice(fat, CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64E | CPU_SUBTYPE_ARM64E_ABI_V2);
if (!macho) { if (!macho) {
fat_free(fat); // If that fails, check for arm64e
return NULL; macho = fat_find_slice(fat, CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64E);
if (!macho) {
fat_free(fat);
return NULL;
}
} }
} }
} }