From 4cac885741b845bd7f4aaad5bc9844b44eb23136 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 22 May 2024 15:46:02 -0400 Subject: all: document legacy //go:linkname for modules with ≥200 dependents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ignored these linknames which have not worked for a while: github.com/xtls/xray-core: context.newCancelCtx removed in CL 463999 (Feb 2023) github.com/u-root/u-root: funcPC removed in CL 513837 (Jul 2023) tinygo.org/x/drivers: net.useNetdev never existed For #67401. Change-Id: I9293f4ef197bb5552b431de8939fa94988a060ce Reviewed-on: https://go-review.googlesource.com/c/go/+/587576 Auto-Submit: Russ Cox Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI --- src/runtime/alg.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/runtime/alg.go') diff --git a/src/runtime/alg.go b/src/runtime/alg.go index f40cc9b8b6..c11ef4c6ef 100644 --- a/src/runtime/alg.go +++ b/src/runtime/alg.go @@ -49,8 +49,12 @@ var useAeshash bool // memhash should be an internal detail, // but widely used packages access it using linkname. // Notable members of the hall of shame include: +// - github.com/aacfactory/fns // - github.com/dgraph-io/ristretto +// - github.com/nbd-wtf/go-nostr // - github.com/outcaste-io/ristretto +// - github.com/puzpuzpuz/xsync/v2 +// - github.com/puzpuzpuz/xsync/v3 // // Do not remove or change the type signature. // See go.dev/issue/67401. @@ -67,6 +71,7 @@ func memhash64(p unsafe.Pointer, h uintptr) uintptr // - github.com/aristanetworks/goarista // - github.com/bytedance/sonic // - github.com/bytedance/go-tagexpr/v2 +// - github.com/cloudwego/frugal // // Do not remove or change the type signature. // See go.dev/issue/67401. @@ -176,6 +181,17 @@ func nilinterhash(p unsafe.Pointer, h uintptr) uintptr { // maps generated by reflect.MapOf (reflect_typehash, below). // Note: this function must match the compiler generated // functions exactly. See issue 37716. +// +// typehash should be an internal detail, +// but widely used packages access it using linkname. +// Notable members of the hall of shame include: +// - github.com/puzpuzpuz/xsync/v2 +// - github.com/puzpuzpuz/xsync/v3 +// +// Do not remove or change the type signature. +// See go.dev/issue/67401. +// +//go:linkname typehash func typehash(t *_type, p unsafe.Pointer, h uintptr) uintptr { if t.TFlag&abi.TFlagRegularMemory != 0 { // Handle ptr sizes specially, see issue 37086. -- cgit v1.3-6-g1900