support universal mach-o binaries

This commit is contained in:
Andrea Fioraldi 2019-12-07 11:42:26 +01:00 committed by GitHub
parent 8bc0b646f0
commit b262c5478c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1903,8 +1903,9 @@ void check_binary(u8* fname) {
#else
#if !defined(__arm__) && !defined(__arm64__)
if (f_data[0] != 0xCF || f_data[1] != 0xFA || f_data[2] != 0xED)
FATAL("Program '%s' is not a 64-bit Mach-O binary", target_path);
if ((f_data[0] != 0xCF || f_data[1] != 0xFA || f_data[2] != 0xED)
&& (f_data[0] != 0xCA || f_data[1] != 0xFE || f_data[2] != 0xBA))
FATAL("Program '%s' is not a 64-bit or universal Mach-O binary", target_path);
#endif
#endif /* ^!__APPLE__ */