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

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