1
0
mirror of https://github.com/golang/go synced 2024-11-18 08:54:45 -07:00

cmd/internal/objfile, debug/macho: support disassembling arm64 Mach-O objects

Fixes #25423

Change-Id: I6bed0726b8f4c7d607a3df271b2ab1006e96fa75
Reviewed-on: https://go-review.googlesource.com/113356
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Tobias Klauser 2018-05-16 14:13:11 +02:00 committed by Tobias Klauser
parent dbd66fd3d0
commit ca3364836f
2 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,8 @@ func (f *machoFile) goarch() string {
return "amd64"
case macho.CpuArm:
return "arm"
case macho.CpuArm64:
return "arm64"
case macho.CpuPpc64:
return "ppc64"
}

View File

@ -60,6 +60,7 @@ const (
Cpu386 Cpu = 7
CpuAmd64 Cpu = Cpu386 | cpuArch64
CpuArm Cpu = 12
CpuArm64 Cpu = CpuArm | cpuArch64
CpuPpc Cpu = 18
CpuPpc64 Cpu = CpuPpc | cpuArch64
)
@ -68,6 +69,7 @@ var cpuStrings = []intName{
{uint32(Cpu386), "Cpu386"},
{uint32(CpuAmd64), "CpuAmd64"},
{uint32(CpuArm), "CpuArm"},
{uint32(CpuArm64), "CpuArm64"},
{uint32(CpuPpc), "CpuPpc"},
{uint32(CpuPpc64), "CpuPpc64"},
}