github.com/FenixAra/go@v0.0.0-20170127160404-96ea0918e670/src/runtime/cgo/openbsd.go (about)

     1  // Copyright 2010 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  // +build openbsd
     6  
     7  package cgo
     8  
     9  import _ "unsafe" // for go:linkname
    10  
    11  // Supply environ, __progname and __guard_local, because
    12  // we don't link against the standard OpenBSD crt0.o and
    13  // the libc dynamic library needs them.
    14  
    15  //go:linkname _environ environ
    16  //go:linkname _progname __progname
    17  //go:linkname _guard_local __guard_local
    18  
    19  var _environ uintptr
    20  var _progname uintptr
    21  var _guard_local uintptr
    22  
    23  //go:cgo_export_dynamic environ environ
    24  //go:cgo_export_dynamic __progname __progname
    25  
    26  // This is normally marked as hidden and placed in the
    27  // .openbsd.randomdata section.
    28  //go:cgo_export_dynamic __guard_local __guard_local
    29  
    30  // We override pthread_create to support PT_TLS.
    31  //go:cgo_export_dynamic pthread_create pthread_create