]> Cypherpunks repositories - gostls13.git/commit
cmd/link: apply -B UUID to external linking on Mach-O
authorCherry Mui <cherryyz@google.com>
Tue, 8 Oct 2024 17:17:47 +0000 (13:17 -0400)
committerCherry Mui <cherryyz@google.com>
Mon, 21 Oct 2024 17:56:41 +0000 (17:56 +0000)
commitc15e589733c7862f58542c9f526bf7bb8881636d
tree05a00dcab5ea37e1a9e409537421203b207e3a9c
parent6a4feb56448aea1a0fe3485122d48fe7111958b1
cmd/link: apply -B UUID to external linking on Mach-O

Currently, on Mach-O, the -B UUID setting is only applied in
internal linking mode, whereas in external linking mode the UUID
is always rewritten to a hash of Go build ID. This CL makes it
apply to external linking as well. This makes the behavior
consistent on both linkmodes, and also consistent with the -B
flag's behavior for GNU build ID on ELF.

Add tests.

Updates #68678.

Cq-Include-Trybots: luci.golang.try:gotip-darwin-amd64_14,gotip-darwin-arm64_13
Change-Id: I276a5930e231141440cdba16e8812df28ac4237b
Reviewed-on: https://go-review.googlesource.com/c/go/+/618599
Reviewed-by: Than McIntosh <thanm@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/macho_combine_dwarf.go
src/cmd/link/internal/ld/macho_update_uuid.go
src/cmd/link/link_test.go