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/72730
Reviewed-by: David Crawshaw <crawshaw@golang.org>
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.