github.com/pkujhd/goloader@v0.0.0-20240411034752-1a28096bd7bd/objabi/tls/headtype.1.8.go (about)

     1  //go:build go1.8 && !go1.9
     2  // +build go1.8,!go1.9
     3  
     4  package tls
     5  
     6  import (
     7  	"cmd/objfile/obj"
     8  	"runtime"
     9  )
    10  
    11  type HeadType uint8
    12  
    13  const (
    14  	Hunknown   = uint8(obj.Hunknown)
    15  	Hdarwin    = uint8(obj.Hdarwin)
    16  	Hdragonfly = uint8(obj.Hdragonfly)
    17  	Hfreebsd   = uint8(obj.Hfreebsd)
    18  	Hlinux     = uint8(obj.Hlinux)
    19  	Hnetbsd    = uint8(obj.Hnetbsd)
    20  	Hopenbsd   = uint8(obj.Hopenbsd)
    21  	Hplan9     = uint8(obj.Hplan9)
    22  	Hsolaris   = uint8(obj.Hsolaris)
    23  	Hwindows   = uint8(obj.Hwindows)
    24  )
    25  
    26  func GetHeadType() uint8 {
    27  	var h obj.HeadType
    28  	h.Set(runtime.GOOS)
    29  	return uint8(h)
    30  }