]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link/internal/ld: modify -pagezero_size to please iTunes Connect validation for...
authorrust <pruest@gmail.com>
Mon, 23 Oct 2017 19:28:08 +0000 (15:28 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Tue, 24 Oct 2017 16:32:30 +0000 (16:32 +0000)
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>
src/cmd/link/internal/ld/lib.go

index bd3abbba0a5698684ef748aeb52be5928ac80afc..083c56c13104687da1ce71412b3fe12af00dcf44 100644 (file)
@@ -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.