Fixes behavior with current clang, which marks the symbol as GLOBAL
instead of WEAK. LLVM change: https://reviews.llvm.org/D90108
base-gcc is unaffected. Keep asm(".weak") for gcc3 until a cleanup can
be tested there.
Initial diff from mortimer@, input and ok kettenis@, ok guenther@
-/* $OpenBSD: crtbeginS.c,v 1.20 2019/01/09 16:42:38 visa Exp $ */
+/* $OpenBSD: crtbeginS.c,v 1.21 2021/12/17 12:03:16 jca Exp $ */
/* $NetBSD: crtbegin.c,v 1.1 1996/09/12 16:59:03 cgd Exp $ */
/*
*/
int _thread_atfork(void (*)(void), void (*)(void), void (*)(void), void *)
__attribute__((weak));
+int pthread_atfork(void (*)(void), void (*)(void), void (*)(void))
+ __attribute__((weak));
int
pthread_atfork(void (*prep)(void), void (*parent)(void), void (*child)(void))