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