]> Cypherpunks repositories - gostls13.git/commit
cmd/link: support internal linking on darwin/arm64
authorCherry Zhang <cherryyz@google.com>
Mon, 12 Oct 2020 17:44:21 +0000 (13:44 -0400)
committerCherry Zhang <cherryyz@google.com>
Wed, 14 Oct 2020 21:32:26 +0000 (21:32 +0000)
commite4ec30965b9ca629922e83b8d335224ae4bdf062
tree02dc7a764ab2664d586ff306187608a360f44588
parent2ec71e57323c4801bb70a8dab687991e551229f4
cmd/link: support internal linking on darwin/arm64

Add support of internal linking on darwin/arm64 (macOS).

Still incomplete. Pure Go binaries work. Cgo doesn't. TLS is not
set up when cgo is not used (as before) (so asynchronous
preemption is not enabled).

Internal linking is not enabled by default but can be requested
via -ldflags=-linkmode=internal.

Updates #38485.

Change-Id: I1e0c81b6028edcb1ac26dcdafeb9bb3f788cf732
Reviewed-on: https://go-review.googlesource.com/c/go/+/261643
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/go/internal/load/pkg.go
src/cmd/internal/sys/supported.go
src/cmd/link/internal/arm64/asm.go
src/cmd/link/internal/arm64/obj.go
src/cmd/link/internal/ld/config.go
src/cmd/link/internal/ld/macho.go
src/cmd/link/internal/ld/main.go
src/runtime/rt0_darwin_arm64.s