mirror of
https://github.com/golang/go
synced 2024-11-12 10:20:27 -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:
parent
def3280eb4
commit
18034e6b9f
@ -91,7 +91,7 @@ func NewFile(r io.ReaderAt) (*File, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
switch f.FileHeader.Machine {
|
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:
|
default:
|
||||||
return nil, fmt.Errorf("Unrecognised COFF file header machine value of 0x%x.", f.FileHeader.Machine)
|
return nil, fmt.Errorf("Unrecognised COFF file header machine value of 0x%x.", f.FileHeader.Machine)
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,7 @@ const (
|
|||||||
IMAGE_FILE_MACHINE_AM33 = 0x1d3
|
IMAGE_FILE_MACHINE_AM33 = 0x1d3
|
||||||
IMAGE_FILE_MACHINE_AMD64 = 0x8664
|
IMAGE_FILE_MACHINE_AMD64 = 0x8664
|
||||||
IMAGE_FILE_MACHINE_ARM = 0x1c0
|
IMAGE_FILE_MACHINE_ARM = 0x1c0
|
||||||
|
IMAGE_FILE_MACHINE_ARMNT = 0x1c4
|
||||||
IMAGE_FILE_MACHINE_ARM64 = 0xaa64
|
IMAGE_FILE_MACHINE_ARM64 = 0xaa64
|
||||||
IMAGE_FILE_MACHINE_EBC = 0xebc
|
IMAGE_FILE_MACHINE_EBC = 0xebc
|
||||||
IMAGE_FILE_MACHINE_I386 = 0x14c
|
IMAGE_FILE_MACHINE_I386 = 0x14c
|
||||||
|
Loading…
Reference in New Issue
Block a user