From c8e1cf49d187e9749e4dfbed5bd81d8b9b3c3307 Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Wed, 14 Sep 2022 19:50:00 -0400 Subject: [release-branch.go1.18] cmd/link: stop passing -pagezero_size to darwin linker We added -pagezero_size in CL 72730, where it was intented for iOS. The current code passes it only on macOS/AMD64 instead. It is not really necessary there. Also, the new darwin linker starts to emit a warning about deprecation of the flag. Stop passing it. For #55113 Updates #54482, #55112. Change-Id: If9db7a1645c37d4284e48f075856912df8d8c1a0 Reviewed-on: https://go-review.googlesource.com/c/go/+/430936 TryBot-Result: Gopher Robot Reviewed-by: Than McIntosh Run-TryBot: Cherry Mui (cherry picked from commit 5231ba2f054f2ecb1387bad00b8745d6fe532ea4) Reviewed-on: https://go-review.googlesource.com/c/go/+/431516 Reviewed-by: Austin Clements --- src/cmd/link/internal/ld/lib.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index f1a37e955e..5fb0b3d21f 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go @@ -1324,7 +1324,6 @@ func (ctxt *Link) hostlink() { if ctxt.HeadType == objabi.Hdarwin { if machoPlatform == PLATFORM_MACOS && ctxt.IsAMD64() { argv = append(argv, "-Wl,-no_pie") - argv = append(argv, "-Wl,-pagezero_size,4000000") } } case BuildModePIE: -- cgit v1.2.3-54-g00ecf