]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link: code-sign on darwin/arm64
authorCherry Zhang <cherryyz@google.com>
Sun, 22 Nov 2020 01:11:03 +0000 (20:11 -0500)
committerCherry Zhang <cherryyz@google.com>
Tue, 1 Dec 2020 23:14:14 +0000 (23:14 +0000)
commit6f84993e90e7076427c1bd0aaebe4e10b764194a
treef0826edc26f549d3aa888c5c15fb6b0c0f589b92
parent4826abb6c2f391a9fb26c83d8ec4d6bc7cc6dc1a
cmd/link: code-sign on darwin/arm64

This CL lets the linker code-sign output binaries on
darwin/arm64, as the kernel requires binaries must be signed in
order to run.

This signature will likely be invalidated when we stamp the
buildid after linking. We still do it in the linker, for
- plain "go tool link" works.
- the linker generates the LC_CODE_SIGNATURE load command with
  the right size and offset, so we don't need to update it when
  stamping the buildid.

Updates #38485, #42684.

Change-Id: Ia306328906d73217221ba31093fe61a935a46122
Reviewed-on: https://go-review.googlesource.com/c/go/+/272256
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/macho.go
src/cmd/link/internal/ld/outbuf.go