aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/runtime
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-01-01 11:51:50 -0800
committerIan Lance Taylor <iant@golang.org>2021-01-01 15:11:45 -0800
commit0b9ef8be40b8ec530e46779a694e3b115b8e685d (patch)
treef4e8435ac2f1306a9959c0a3df4d7333601d132e /libgo/go/runtime
parentabca6705969b59edae86f11233f9d207cbdd1e06 (diff)
downloadgcc-0b9ef8be40b8ec530e46779a694e3b115b8e685d.zip
gcc-0b9ef8be40b8ec530e46779a694e3b115b8e685d.tar.gz
gcc-0b9ef8be40b8ec530e46779a694e3b115b8e685d.tar.bz2
runtime: move startupRandomData back to runtime2.go
In libgo it's referenced from os_gccgo.go on all platforms. Fixes go/98496 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/280999
Diffstat (limited to 'libgo/go/runtime')
-rw-r--r--libgo/go/runtime/os_linux.go4
-rw-r--r--libgo/go/runtime/runtime2.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/libgo/go/runtime/os_linux.go b/libgo/go/runtime/os_linux.go
index 0eebdfa..627b6d6 100644
--- a/libgo/go/runtime/os_linux.go
+++ b/libgo/go/runtime/os_linux.go
@@ -178,10 +178,6 @@ func sysargs(argc int32, argv **byte) {
sysauxv(buf[:])
}
-// startupRandomData holds random bytes initialized at startup. These come from
-// the ELF AT_RANDOM auxiliary vector.
-var startupRandomData []byte
-
func sysauxv(auxv []uintptr) int {
var i int
for ; auxv[i] != _AT_NULL; i += 2 {
diff --git a/libgo/go/runtime/runtime2.go b/libgo/go/runtime/runtime2.go
index 2e55015..023dac3 100644
--- a/libgo/go/runtime/runtime2.go
+++ b/libgo/go/runtime/runtime2.go
@@ -885,6 +885,10 @@ type forcegcstate struct {
idle uint32
}
+// startupRandomData holds random bytes initialized at startup. These come from
+// the ELF AT_RANDOM auxiliary vector.
+var startupRandomData []byte
+
// extendRandom extends the random numbers in r[:n] to the whole slice r.
// Treats n<0 as n==0.
func extendRandom(r []byte, n int) {