// Copyright 2024 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.
// Package checktest defines some code and data for use in// the crypto/internal/fips140/check test.
package checktestimport (__// go:linkname)varNOPTRDATAint = 1// The linkname here disables asan registration of this global,// because asan gets mad about rodata globals.////go:linkname RODATA crypto/internal/fips140/check/checktest.RODATAvarRODATAint32// set to 2 in asm.s// DATA needs to have both a pointer and an int so that _some_ of it gets// initialized at link time, so it is treated as DATA and not BSS.// The pointer is deferred to init time.varDATA = struct { P *int X int}{&NOPTRDATA, 3}varNOPTRBSSintvarBSS *intfunc () {}var ( globl12 [12]byte globl8 [8]byte)func init() {globl8 = [8]byte{1, 2, 3, 4, 5, 6, 7, 8}globl12 = [12]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}runtime.Gosched() := byte(0)for , := rangeglobl12 { += }if != 78 {panic("globl12 did not sum properly") } = byte(0)for , := rangeglobl8 { += }if != 36 {panic("globl8 did not sum properly") }}
The pages are generated with Goldsv0.7.3. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.