aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/objfile/pe.go
diff options
context:
space:
mode:
authorJordan Rhee <jordanrh@microsoft.com>2018-07-24 15:13:41 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2018-08-21 22:11:05 +0000
commitaa311fecda008d26f97af0a8e7f57dcd04cae6ae (patch)
tree55bb1c2704e431c12e58f9ffba0efb4fa10caf8d /src/cmd/internal/objfile/pe.go
parent39e59da76debbe98efdf6e2faa045b8c3804d742 (diff)
downloadgo-aa311fecda008d26f97af0a8e7f57dcd04cae6ae.tar.xz
cmd/link: support windows/arm
Enable the Go linker to generate executables for windows/arm. Generates PE relocation tables, which are used by Windows to dynamically relocate the Go binary in memory. Windows on ARM requires all modules to be relocatable, unlike x86/amd64 which are permitted to have fixed base addresses. Updates #26148 Change-Id: Ie63964ff52c2377e121b2885e9d05ec3ed8dc1cd Reviewed-on: https://go-review.googlesource.com/125648 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/internal/objfile/pe.go')
-rw-r--r--src/cmd/internal/objfile/pe.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/internal/objfile/pe.go b/src/cmd/internal/objfile/pe.go
index 80db6f0f18..259b59a4f4 100644
--- a/src/cmd/internal/objfile/pe.go
+++ b/src/cmd/internal/objfile/pe.go
@@ -190,6 +190,9 @@ func (f *peFile) goarch() string {
if _, err := findPESymbol(f.pe, "_rt0_amd64_windows"); err == nil {
return "amd64"
}
+ if _, err := findPESymbol(f.pe, "_rt0_arm_windows"); err == nil {
+ return "arm"
+ }
return ""
}