]> Cypherpunks repositories - gostls13.git/commit
cmd/link: split large text sections on Darwin/ARM64 when external linking
authorCherry Mui <cherryyz@google.com>
Thu, 6 May 2021 16:24:32 +0000 (12:24 -0400)
committerCherry Mui <cherryyz@google.com>
Thu, 6 May 2021 20:23:33 +0000 (20:23 +0000)
commitf39997b2bebd54416bfb437fa1484fd8a5f43abb
tree89d4bd4b4cb907a11cc9027f3c0d24ce83d1895f
parent90d6bbbe42c15d444c1da0a1c293192d6f735a8e
cmd/link: split large text sections on Darwin/ARM64 when external linking

The Darwin linker does not like text sections that are larger
than the jump limit (even if we already inserted trampolines).
Split the text section to multiple smaller sections.

Now external linking very large binaries works on Darwin/ARM64.

Updates #40492.

Change-Id: I584f1ec673170c5e4d2dc1e00c701964d6f14333
Reviewed-on: https://go-review.googlesource.com/c/go/+/316050
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/ld_test.go
src/cmd/link/internal/ld/macho.go
src/cmd/link/internal/ld/main.go