From 7d7885af1816e9c68338d4351e8fe6bf5542e7a7 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 11 Nov 2020 21:41:10 +0100 Subject: updater: use constants from debug/pe These are nice here, but we don't want to use them for memmod, since there we need a more complete linker. Signed-off-by: Jason A. Donenfeld --- updater/versions_arm.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'updater/versions_arm.go') diff --git a/updater/versions_arm.go b/updater/versions_arm.go index 2ffb4b74..f3e43ec3 100644 --- a/updater/versions_arm.go +++ b/updater/versions_arm.go @@ -6,6 +6,7 @@ package updater import ( + "debug/pe" "errors" "golang.org/x/sys/windows" @@ -17,15 +18,15 @@ func findArch() (arch string, err error) { if err2 != nil { var isWow64 bool if windows.IsWow64Process(process, &isWow64) != nil || !isWow64 { - nativeMachine = IMAGE_FILE_MACHINE_ARMNT + nativeMachine = pe.IMAGE_FILE_MACHINE_ARMNT } else { - nativeMachine = IMAGE_FILE_MACHINE_ARM64 + nativeMachine = pe.IMAGE_FILE_MACHINE_ARM64 } } switch nativeMachine { - case IMAGE_FILE_MACHINE_ARM64: + case pe.IMAGE_FILE_MACHINE_ARM64: arch = "arm64" - case IMAGE_FILE_MACHINE_ARMNT: + case pe.IMAGE_FILE_MACHINE_ARMNT: arch = "arm" default: err = errors.New("Invalid GOARCH") -- cgit v1.2.3-59-g8ed1b