1
0
mirror of https://github.com/golang/go synced 2024-11-23 18:00:06 -07:00

debug/pe: support windows/arm

Enable 'go tool objdump' to disassemble windows/arm images.

Updates #26148

Change-Id: I7d11226f01d92288061f8e25980334b9bd82c41f
Reviewed-on: https://go-review.googlesource.com/125649
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Jordan Rhee 2018-07-24 15:17:54 -07:00 committed by Brad Fitzpatrick
parent def3280eb4
commit 18034e6b9f
2 changed files with 2 additions and 1 deletions

View File

@ -91,7 +91,7 @@ func NewFile(r io.ReaderAt) (*File, error) {
return nil, err
}
switch f.FileHeader.Machine {
case IMAGE_FILE_MACHINE_UNKNOWN, IMAGE_FILE_MACHINE_AMD64, IMAGE_FILE_MACHINE_I386:
case IMAGE_FILE_MACHINE_UNKNOWN, IMAGE_FILE_MACHINE_ARMNT, IMAGE_FILE_MACHINE_AMD64, IMAGE_FILE_MACHINE_I386:
default:
return nil, fmt.Errorf("Unrecognised COFF file header machine value of 0x%x.", f.FileHeader.Machine)
}

View File

@ -91,6 +91,7 @@ const (
IMAGE_FILE_MACHINE_AM33 = 0x1d3
IMAGE_FILE_MACHINE_AMD64 = 0x8664
IMAGE_FILE_MACHINE_ARM = 0x1c0
IMAGE_FILE_MACHINE_ARMNT = 0x1c4
IMAGE_FILE_MACHINE_ARM64 = 0xaa64
IMAGE_FILE_MACHINE_EBC = 0xebc
IMAGE_FILE_MACHINE_I386 = 0x14c