]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: adjust comments for auxv getAuxv
authorTobias Klauser <tklauser@distanz.ch>
Tue, 4 Feb 2025 16:04:26 +0000 (17:04 +0100)
committerGopher Robot <gobot@golang.org>
Wed, 5 Feb 2025 17:41:51 +0000 (09:41 -0800)
github.com/cilium/ebpf no longer accesses getAuxv using linkname but now
uses the golang.org/x/sys/unix.Auxv wrapper introduced in
go.dev/cl/644295.

Also adjust the list of users to include x/sys/unix.

Updates #67839
Updates #67401

Change-Id: Ieee266360b22cc0bc4be8f740e0302afd7dbd14f
Reviewed-on: https://go-review.googlesource.com/c/go/+/646535
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/runtime/runtime.go

index e8e614815d236bacfd6d9d302854529216097820..3afb6558b03f50a6b246f3a321752d474e5710f0 100644 (file)
@@ -290,23 +290,15 @@ func setCrashFD(fd uintptr) uintptr {
 }
 
 // auxv is populated on relevant platforms but defined here for all platforms
-// so x/sys/cpu can assume the getAuxv symbol exists without keeping its list
-// of auxv-using GOOS build tags in sync.
+// so x/sys/cpu and x/sys/unix can assume the getAuxv symbol exists without
+// keeping its list of auxv-using GOOS build tags in sync.
 //
 // It contains an even number of elements, (tag, value) pairs.
 var auxv []uintptr
 
-// golang.org/x/sys/cpu uses getAuxv via linkname.
+// golang.org/x/sys/cpu and golang.org/x/sys/unix use getAuxv via linkname.
 // Do not remove or change the type signature.
-// (See go.dev/issue/57336.)
-//
-// getAuxv should be an internal detail,
-// but widely used packages access it using linkname.
-// Notable members of the hall of shame include:
-//   - github.com/cilium/ebpf
-//
-// Do not remove or change the type signature.
-// See go.dev/issue/67401.
+// See go.dev/issue/57336 and go.dev/issue/67401.
 //
 //go:linkname getAuxv
 func getAuxv() []uintptr { return auxv }