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
This commit is contained in:
Ian Lance Taylor 2021-01-01 11:51:50 -08:00
parent abca670596
commit 0b9ef8be40
3 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
6857530fb1662c05a3ce754df2bd9fa5acd3a35b
fa161cb71880cf80ef53fb4bf35dba8ee01af648
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.

View File

@ -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 {

View File

@ -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) {