diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2022-12-16 20:19:33 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-02-16 19:34:38 +0000 |
| commit | 1a9893a969e0a73dc4f1e48ed40ccaf29ec238a6 (patch) | |
| tree | 9cf5add65f658ae241275c76387fa4743b868f0b /src/runtime/runtime.go | |
| parent | 518889b35cb07f3e71963f2ccfc0f96ee26a51ce (diff) | |
| download | go-1a9893a969e0a73dc4f1e48ed40ccaf29ec238a6.tar.xz | |
runtime: expose auxv for use by x/sys/cpu
Updates #57336
Change-Id: I181885f59bac59360b855d3990326ea2b268bd28
Reviewed-on: https://go-review.googlesource.com/c/go/+/458256
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/runtime.go')
| -rw-r--r-- | src/runtime/runtime.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go index f240d7ae70..0822d0e805 100644 --- a/src/runtime/runtime.go +++ b/src/runtime/runtime.go @@ -151,3 +151,12 @@ func syscall_runtimeUnsetenv(key string) { func writeErrStr(s string) { write(2, unsafe.Pointer(unsafe.StringData(s)), int32(len(s))) } + +// 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. +// +// It contains an even number of elements, (tag, value) pairs. +var auxv []uintptr + +func getAuxv() []uintptr { return auxv } // accessed from x/sys/cpu; see issue 57336 |
