summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-08-31 04:58:47 +0000
committerguenther <guenther@openbsd.org>2015-08-31 04:58:47 +0000
commit1b618090a8b214ecc0104b24783df550ff5a6f7f (patch)
treec92018fec30221fe2ad0905ed8610b7976328871 /lib/libc
parentAdd ALTEXIT_{STRONG,WEAK} to support wrapping of functions using ALTENTRY. (diff)
downloadwireguard-openbsd-1b618090a8b214ecc0104b24783df550ff5a6f7f.tar.xz
wireguard-openbsd-1b618090a8b214ecc0104b24783df550ff5a6f7f.zip
Also add ALTEXIT_{STRONG,WEAK} to hppa64, copied from hppa. Document'em too
ok deraadt@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arch/hppa/SYS.h4
-rw-r--r--lib/libc/arch/hppa64/SYS.h10
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/libc/arch/hppa/SYS.h b/lib/libc/arch/hppa/SYS.h
index 60767c1014d..4a957a2a310 100644
--- a/lib/libc/arch/hppa/SYS.h
+++ b/lib/libc/arch/hppa/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.19 2015/08/31 04:53:36 guenther Exp $ */
+/* $OpenBSD: SYS.h,v 1.20 2015/08/31 04:58:47 guenther Exp $ */
/*
* Copyright (c) 1998-2002 Michael Shalayeff
@@ -51,6 +51,8 @@
* For functions implemented in ASM that aren't syscalls.
* EXIT_STRONG(x) Like DEF_STRONG() in C; for standard/reserved C names
* EXIT_WEAK(x) Like DEF_WEAK() in C; for non-ISO C names
+ * ALTEXIT_STRONG(x) and ALTEXIT_WEAK()
+ * Matching macros for ALTENTRY functions
*/
#define ALTEXIT_STRONG(x) \
_HIDDEN_FALIAS(x,x) !\
diff --git a/lib/libc/arch/hppa64/SYS.h b/lib/libc/arch/hppa64/SYS.h
index c61fcface6b..7332feb154b 100644
--- a/lib/libc/arch/hppa64/SYS.h
+++ b/lib/libc/arch/hppa64/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.8 2015/08/31 02:53:56 guenther Exp $ */
+/* $OpenBSD: SYS.h,v 1.9 2015/08/31 04:58:48 guenther Exp $ */
/*
* Copyright (c) 1998-2002 Michael Shalayeff
@@ -51,10 +51,16 @@
* For functions implemented in ASM that aren't syscalls.
* EXIT_STRONG(x) Like DEF_STRONG() in C; for standard/reserved C names
* EXIT_WEAK(x) Like DEF_WEAK() in C; for non-ISO C names
+ * ALTEXIT_STRONG(x) and ALTEXIT_WEAK()
+ * Matching macros for ALTENTRY functions
*/
-#define EXIT_STRONG(x) EXIT(x) !\
+#define ALTEXIT_STRONG(x) \
_HIDDEN_FALIAS(x,x) !\
.size _HIDDEN(x), . - _HIDDEN(x)
+#define ALTEXIT_WEAK(x) ALTEXIT_STRONG(x) !\
+ .weak x
+#define EXIT_STRONG(x) EXIT(x) !\
+ ALTEXIT_STRONG(x)
#define EXIT_WEAK(x) EXIT_STRONG(x) !\
.weak x