Commit 89a7adf8 authored by rust's avatar rust Committed by David Crawshaw

cmd/link/internal/ld: modify -pagezero_size to please iTunes Connect validation for iOS.

This change modifies go to create iOS arm64 binaries that pass iTunes
upload validation. Tested with xcode 9.0.1 macOS 10.13.

Fixes #22402.

Change-Id: I3f14c6ac85065e2da88d06edc8682947f6f1cd47
Reviewed-on: https://go-review.googlesource.com/72730Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
parent 2fd95497
......@@ -1105,7 +1105,10 @@ func (ctxt *Link) hostlink() {
switch ctxt.BuildMode {
case BuildModeExe:
if ctxt.HeadType == objabi.Hdarwin {
argv = append(argv, "-Wl,-pagezero_size,4000000")
// __PAGEZERO segment size determined empirically.
// XCode 9.0.1 successfully uploads an iOS app with this value.
// Also works for macOS apps.
argv = append(argv, "-Wl,-pagezero_size,100000000")
}
case BuildModePIE:
// ELF.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment