aboutsummaryrefslogtreecommitdiff
path: root/src/sync
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2024-05-16 17:19:15 -0400
committerCherry Mui <cherryyz@google.com>2024-05-17 16:48:00 +0000
commit41aab30bd260297ad8ddad47e98fdf8390a9a67e (patch)
tree35f0a55a0bf582f2df6faa2be02e185db43dabcc /src/sync
parentf73dd8173a2d459113254dbd71d47856b5be0441 (diff)
downloadgo-41aab30bd260297ad8ddad47e98fdf8390a9a67e.tar.gz
go-41aab30bd260297ad8ddad47e98fdf8390a9a67e.zip
all: add push linknames to allow legacy pull linknames
CL 585358 adds restrictions to disallow pull-only linknames (currently off by default). Currently, there are quite some pull- only linknames in user code in the wild. In order not to break those, we add push linknames to allow them to be pulled. This CL includes linknames found in a large code corpus (thanks Matthew Dempsky and Michael Pratt for the analysis!), that are not currently linknamed. Updates #67401. Change-Id: I32f5fc0c7a6abbd7a11359a025cfa2bf458fe767 Reviewed-on: https://go-review.googlesource.com/c/go/+/586137 Reviewed-by: Russ Cox <rsc@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/sync')
-rw-r--r--src/sync/badlinkname.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sync/badlinkname.go b/src/sync/badlinkname.go
new file mode 100644
index 0000000000..8dcff6d7fc
--- /dev/null
+++ b/src/sync/badlinkname.go
@@ -0,0 +1,15 @@
+// Copyright 2024 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sync
+
+import _ "unsafe"
+
+// As of Go 1.22, the symbols below are found to be pulled via
+// linkname in the wild. We provide a push linkname here, to
+// keep them accessible with pull linknames.
+// This may change in the future. Please do not depend on them
+// in new code.
+
+//go:linkname poolCleanup