summaryrefslogtreecommitdiff
path: root/lib/libc/include/namespace.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/include/namespace.h')
-rw-r--r--lib/libc/include/namespace.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libc/include/namespace.h b/lib/libc/include/namespace.h
index c8c864a266e..cfdb95ad023 100644
--- a/lib/libc/include/namespace.h
+++ b/lib/libc/include/namespace.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: namespace.h,v 1.6 2015/09/10 18:13:46 guenther Exp $ */
+/* $OpenBSD: namespace.h,v 1.7 2015/09/11 09:18:27 guenther Exp $ */
#ifndef _LIBC_NAMESPACE_H_
#define _LIBC_NAMESPACE_H_
@@ -124,6 +124,12 @@
* only be needed for syscalls that have C instead of asm stubs.
* Matches with PROTO_NORMAL(), PROTO_CANCEL(), or PROTO_WRAP()
* ex: DEF_SYS(pread)
+ *
+ * MAKE_CLONE(dst, src) Symbols that are exact clones of other symbols
+ * This declares _libc_dst as being the same type as dst, and makes
+ * _libc_dst a strong, hidden alias for _libc_src. You still need to
+ * DEF_STRONG(dst) or DEF_WEAK(dst) to alias dst itself
+ * ex: MAKE_CLONE(SHA224Pad, SHA256Pad)
*/
#include <sys/cdefs.h> /* for __dso_hidden and __{weak,strong}_alias */
@@ -146,6 +152,9 @@
#define DEF_WRAP(x) __weak_alias(x, WRAP(x))
#define DEF_SYS(x) __strong_alias(_thread_sys_##x, HIDDEN(x))
+#define MAKE_CLONE(dst, src) __dso_hidden typeof(dst) HIDDEN(dst) \
+ __attribute__((alias (HIDDEN_STRING(src))))
+
/*
* gcc will generate calls to the functions below.