Skip to content

Commit 3d6d0d9

Browse files
authored
Support PowerPC architecture for MachO binaries (#183)
1 parent 3cb2420 commit 3d6d0d9

File tree

3 files changed

+2
-0
lines changed

3 files changed

+2
-0
lines changed

ropgadget/loaders/macho.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ def getArch(self):
307307
return CS_ARCH_ARM64
308308
if self.__machHeader.cputype == MACHOFlags.CPU_TYPE_MIPS:
309309
return CS_ARCH_MIPS
310+
if self.__machHeader.cputype == MACHOFlags.CPU_TYPE_POWERPC or self.__machHeader.cputype == MACHOFlags.CPU_TYPE_POWERPC64:
311+
return CS_ARCH_PPC
310312
print("[Error] MACHO.getArch() - Architecture not supported")
311313
return None
312314

440 KB
Binary file not shown.

test-suite-binaries/ref_output.bz2

2.94 KB
Binary file not shown.

0 commit comments

Comments
 (0)