From 5fee159bc2e60736ce967560ee5be738fe5d5bd2 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 21 May 2024 23:02:51 -0400 Subject: all: document legacy //go:linkname for modules with ≥50,000 dependents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note that this depends on the revert of CL 581395 to move zeroVal back. For #67401. Change-Id: I507c27c2404ad1348aabf1ffa3740e6b1957495b Reviewed-on: https://go-review.googlesource.com/c/go/+/587217 LUCI-TryBot-Result: Go LUCI Auto-Submit: Russ Cox Reviewed-by: Cherry Mui --- src/runtime/runtime.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/runtime/runtime.go') diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go index 6cf903d2c1..9b3ca719ea 100644 --- a/src/runtime/runtime.go +++ b/src/runtime/runtime.go @@ -305,5 +305,13 @@ func getAuxv() []uintptr { return auxv } // zeroVal is used by reflect via linkname. // +// zeroVal should be an internal detail, +// but widely used packages access it using linkname. +// Notable members of the hall of shame include: +// - github.com/ugorji/go/codec +// +// Do not remove or change the type signature. +// See go.dev/issue/67401. +// //go:linkname zeroVal var zeroVal [abi.ZeroValSize]byte -- cgit v1.3