github.com/hongwozai/go-src-1.4.3@v0.0.0-20191127132709-dc3fce3dbccb/src/runtime/cgo/openbsd.c (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  #include "textflag.h"
     8  
     9  // Supply environ, __progname and __guard_local, because
    10  // we don't link against the standard OpenBSD crt0.o and
    11  // the libc dynamic library needs them.
    12  
    13  #pragma dataflag NOPTR
    14  char *environ[1];
    15  #pragma dataflag NOPTR
    16  char *__progname;
    17  long __guard_local;
    18  
    19  #pragma dynexport environ environ
    20  #pragma dynexport __progname __progname
    21  
    22  // This is normally marked as hidden and placed in the
    23  // .openbsd.randomdata section.
    24  #pragma dynexport __guard_local __guard_local
    25  
    26  // We override pthread_create to support PT_TLS.
    27  #pragma dynexport pthread_create pthread_create