diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-11 21:41:10 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-16 18:17:05 +0100 |
commit | 7d7885af1816e9c68338d4351e8fe6bf5542e7a7 (patch) | |
tree | a0d4d0a03d54343483b8ff00a78f25d7c0916a87 /updater/versions_arm.go | |
parent | build: opt-in to resource loading of wintun.dll (diff) | |
download | wireguard-windows-7d7885af1816e9c68338d4351e8fe6bf5542e7a7.tar.xz wireguard-windows-7d7885af1816e9c68338d4351e8fe6bf5542e7a7.zip |
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 <Jason@zx2c4.com>
Diffstat (limited to 'updater/versions_arm.go')
-rw-r--r-- | updater/versions_arm.go | 9 |
1 files changed, 5 insertions, 4 deletions
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") |