aboutsummaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-08-04 12:05:15 -0700
committerGopher Robot <gobot@golang.org>2022-08-08 20:15:03 +0000
commitd6ccb4ead9c995ee2bff10079118bf91d1b646e9 (patch)
treebf3fbe7ff3f024f75d1bf138066ae6dcc7f57cac /src/debug
parenta34a97d88d9aac5f0ca8422243ea15c89fa8d880 (diff)
downloadgo-d6ccb4ead9c995ee2bff10079118bf91d1b646e9.tar.xz
debug/pe: use correct pe64 test in ImportedSymbols
64-bit PE is set by the optional header magic number, not by the machine field. Fixes #54250 Change-Id: I4d01bc08553780d5470e63f0b17bbd968323e5d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/421394 Reviewed-by: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/pe/file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debug/pe/file.go b/src/debug/pe/file.go
index aa0955a133..e8b1a4f5e2 100644
--- a/src/debug/pe/file.go
+++ b/src/debug/pe/file.go
@@ -322,7 +322,7 @@ func (f *File) ImportedSymbols() ([]string, error) {
return nil, nil
}
- pe64 := f.Machine == IMAGE_FILE_MACHINE_AMD64 || f.Machine == IMAGE_FILE_MACHINE_ARM64
+ _, pe64 := f.OptionalHeader.(*OptionalHeader64)
// grab the number of data directory entries
var dd_length uint32