aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/go-patches/0011-cmd-link-windows-arm-is-all-pie-so-mark-it-as-such.patch
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-12-22 21:20:09 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-01-04 13:33:10 +0100
commit2c9d5a47ca33eb69d40bc81a8c93aa97e18cc785 (patch)
tree669fd06c641188e5f410576fe8d3020413d66b64 /go-patches/0011-cmd-link-windows-arm-is-all-pie-so-mark-it-as-such.patch
parentconf: rename migration to migration_windows (diff)
downloadwireguard-windows-2c9d5a47ca33eb69d40bc81a8c93aa97e18cc785.tar.xz
wireguard-windows-2c9d5a47ca33eb69d40bc81a8c93aa97e18cc785.zip
build: update to go 1.16 beta1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'go-patches/0011-cmd-link-windows-arm-is-all-pie-so-mark-it-as-such.patch')
-rw-r--r--go-patches/0011-cmd-link-windows-arm-is-all-pie-so-mark-it-as-such.patch44
1 files changed, 0 insertions, 44 deletions
diff --git a/go-patches/0011-cmd-link-windows-arm-is-all-pie-so-mark-it-as-such.patch b/go-patches/0011-cmd-link-windows-arm-is-all-pie-so-mark-it-as-such.patch
deleted file mode 100644
index a2984678..00000000
--- a/go-patches/0011-cmd-link-windows-arm-is-all-pie-so-mark-it-as-such.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From fee7906e1a7e62b655bea0f25c921572ee29fc44 Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Thu, 26 Nov 2020 22:38:45 +0100
-Subject: [PATCH 11/14] cmd/link: windows/arm is all pie, so mark it as such
-
-If the linker thinks that it's making an exe instead of a pie object, it
-won't apply relocations to the pclntab and we wind up with crashes like:
-
- Building Go toolchain2 using go_bootstrap and Go toolchain1.
- fatal error: minpc or maxpc invalid
- runtime: panic before malloc heap initialized
-
-This problem was already solved by darwin/arm64, so solve it the same
-way here for windows/arm.
-
-Fixes CL 228478.
-Updates #42786.
-
-Change-Id: I6d1db6907c131183649fc263ccca06783188f344
----
- src/cmd/link/internal/ld/config.go | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/cmd/link/internal/ld/config.go b/src/cmd/link/internal/ld/config.go
-index 2373b500e3..83a8698289 100644
---- a/src/cmd/link/internal/ld/config.go
-+++ b/src/cmd/link/internal/ld/config.go
-@@ -35,7 +35,12 @@ func (mode *BuildMode) Set(s string) error {
- default:
- return fmt.Errorf("invalid buildmode: %q", s)
- case "exe":
-- *mode = BuildModeExe
-+ switch objabi.GOOS + "/" + objabi.GOARCH {
-+ case "windows/arm": // On these platforms, everything is PIE
-+ *mode = BuildModePIE
-+ default:
-+ *mode = BuildModeExe
-+ }
- case "pie":
- switch objabi.GOOS {
- case "aix", "android", "linux", "windows":
---
-2.29.2
-