]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.22] cmd/compile: make jump table symbol static
authorCherry Mui <cherryyz@google.com>
Tue, 20 Feb 2024 20:05:29 +0000 (15:05 -0500)
committerCarlos Amedee <carlos@golang.org>
Tue, 27 Feb 2024 21:18:11 +0000 (21:18 +0000)
commit686662f3a461b0bfa585a106ef585220a2a85014
tree3a5eb8b33d30af4f3e39c42833afd8e867b7b3dc
parent6cbe522fe1db19bb7d404d613bb9f2f46ca40655
[release-branch.go1.22] cmd/compile: make jump table symbol static

The jump table symbol is accessed only from the function symbol
(in the same package), so it can be static. Also, if the function
is DUPOK and it is, somehow, compiled differently in two different
packages, the linker must choose the jump table symbol associated
to the function symbol it chose. Currently the jump table symbol
is DUPOK, so that is not guaranteed. Making it static will
guarantee that, as each copy of the function symbol refers to its
own jump table symbol.

Updates #65783.
Fixes #65818.

Change-Id: I27e051d01ef585d07700b75d4dfac5768f16441e
Reviewed-on: https://go-review.googlesource.com/c/go/+/565535
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit 290835298067014e906c540d64dcaa706d66b2ce)
Reviewed-on: https://go-review.googlesource.com/c/go/+/566475
src/cmd/compile/internal/ssa/rewrite.go