From 41aab30bd260297ad8ddad47e98fdf8390a9a67e Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Thu, 16 May 2024 17:19:15 -0400 Subject: 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 LUCI-TryBot-Result: Go LUCI --- src/database/sql/badlinkname.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/database/sql/badlinkname.go (limited to 'src/database/sql') diff --git a/src/database/sql/badlinkname.go b/src/database/sql/badlinkname.go new file mode 100644 index 0000000000..a77def9fbd --- /dev/null +++ b/src/database/sql/badlinkname.go @@ -0,0 +1,16 @@ +// 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 sql + +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 convertAssign +//go:linkname drivers -- cgit v1.3