github.com/songzhibin97/go-baseutils@v0.0.2-0.20240302024150-487d8ce9c082/sys/cpu/runtime_auxv_go121.go (about)

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build go1.21
     6  // +build go1.21
     7  
     8  package cpu
     9  
    10  import (
    11  	_ "unsafe" // for linkname
    12  )
    13  
    14  //go:linkname runtime_getAuxv runtime.getAuxv
    15  func runtime_getAuxv() []uintptr
    16  
    17  func init() {
    18  	getAuxvFn = runtime_getAuxv
    19  }