✘~/workspace/gowork/src/pthread $ go build .
ccode.c:12:15: warning: incompatible integer to pointer conversion passing 'pthread_t' (aka 'unsigned long') to parameter of type 'pthread_once_t *' (aka 'int *') [-Wint-conversion]
/usr/include/pthread.h:495:42: note: passing argument to parameter '__once_control' here
ccode.c:12:23: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
/usr/lib/gcc/x86_64-linux-gnu/8/libgcc.a(generic-morestack-thread.o):function __wrap_pthread_create: error: undefined reference to 'pthread_once'
~/workspace/gowork/src/pthread $ ldd main
linux-vdso.so.1 (0x00007ffc58db4000)
libgo.so.13git => /home/jxzhang/.local/gollvm/lib64/libgo.so.13git (0x00007fc599db0000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc599a12000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc5997fa000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc599409000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc59b6cb000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc5991ea000)
~/workspace/gowork/src/pthread $ nm /home/jxzhang/.local/gollvm/lib64/libgo.so.13git | grep -E "pthread_create|pthread_join|pthread_once"
w pthread_create
w pthread_once
0000000001089d70 t __wrap_pthread_create
~/workspace/gowork/src/pthread $ nm /lib/x86_64-linux-gnu/libpthread.so.0 | grep -E "pthread_create|pthread_join|pthread_once"
000000000000f9b0 t __GI___pthread_once
00000000000079b0 t __pthread_create_2_1
00000000000079b0 T pthread_create@@GLIBC_2.2.5
0000000000008b50 t __pthread_join
0000000000008b50 W pthread_join
000000000000f9b0 T __pthread_once
000000000000f9b0 W pthread_once
000000000000f850 t __pthread_once_slow