]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.22] cmd/link: add runtime.text.N symbols to macho symbol table...
authorCherry Mui <cherryyz@google.com>
Fri, 17 May 2024 23:59:31 +0000 (19:59 -0400)
committerCarlos Amedee <carlos@golang.org>
Fri, 24 May 2024 21:00:57 +0000 (21:00 +0000)
commitcb55d1a0c8e37c4e5c3c45dc6e8fed8d76a18b90
treeea25ace48d3f98e14ffb1a7c127569ae6b95427f
parent3c96ae08701dd3ed66e0f8a81a80e3336a4d9aae
[release-branch.go1.22] cmd/link: add runtime.text.N symbols to macho symbol table in dynlink mode

In dynamic linking mode (e.g. when using plugins) on darwin, the
marker symbols runtime.text and runtime.etext are added to Textp
in an early stage, so when adding symbols to the symbol table we
don't need to explicitly add them. However, when splitting text
sections, the runtime.text.N marker symbols for the addtional
sections are not added to Textp. So we do need to add them
explicitly to the symbol table.

Updates #66993.
Fixes #67527.

Change-Id: Ic718d03cd71fc0bfb931cff82640b1f4c53b89be
Reviewed-on: https://go-review.googlesource.com/c/go/+/586555
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
(cherry picked from commit 9a9dd72d5c2b2f808a0a7ef204e307bc1dbee78c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/586081
src/cmd/cgo/internal/testplugin/plugin_test.go
src/cmd/link/internal/ld/macho.go