From b2c7be39ee1b6f06e89aaded3cac96842011af4b Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Wed, 15 Nov 2023 06:59:13 -0800 Subject: [PATCH] Add support for ARM64 architecture in FileInfo struct and machoFile --- file.go | 1 + macho.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/file.go b/file.go index 369f47f..3097b3d 100644 --- a/file.go +++ b/file.go @@ -391,6 +391,7 @@ type FileInfo struct { const ( ArchAMD64 = "amd64" ArchARM = "arm" + ArchARM64 = "arm64" Arch386 = "i386" ArchMIPS = "mips" ) diff --git a/macho.go b/macho.go index 1903732..2e913ba 100644 --- a/macho.go +++ b/macho.go @@ -113,6 +113,9 @@ func (m *machoFile) getFileInfo() *FileInfo { case macho.CpuAmd64: fi.WordSize = intSize64 fi.Arch = ArchAMD64 + case macho.CpuArm64: + fi.WordSize = intSize64 + fi.Arch = ArchARM64 default: panic("Unsupported architecture") }