Skip to content

Commit

Permalink
Also skip parsing armv7s slice
Browse files Browse the repository at this point in the history
  • Loading branch information
opa334 committed Apr 30, 2024
1 parent 1746c51 commit 362eac1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/MachO.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#include "MemoryStream.h"

#include <mach-o/loader.h>
#import <mach-o/nlist.h>
#include <mach-o/nlist.h>
#include <mach/machine.h>
#include <stdlib.h>

int macho_read_at_offset(MachO *macho, uint64_t offset, size_t size, void *outBuf)
Expand Down Expand Up @@ -273,12 +274,11 @@ int macho_parse_fileset_machos(MachO *macho)
int _macho_parse(MachO *macho)
{
// Determine if this arch is supported by ChOma
macho->isSupported = (macho->archDescriptor.cpusubtype != 0x9);

macho->isSupported = (macho->archDescriptor.cpusubtype != CPU_SUBTYPE_ARM_V7 && macho->archDescriptor.cpusubtype != CPU_SUBTYPE_ARM_V7S);
if (macho->isSupported) {
// Ensure that the sizeofcmds is a multiple of 8 (it would need padding otherwise)
if (macho->machHeader.sizeofcmds % 8 != 0) {
printf("Error: sizeofcmds is not a multiple of 8.\n");
printf("Error: sizeofcmds is not a multiple of 8 (%d).\n", macho->machHeader.sizeofcmds);
return -1;
}

Expand Down

0 comments on commit 362eac1

Please sign in to comment.