From b0404dc3aed5b42933d7f9650d2a9f6e0620f34c Mon Sep 17 00:00:00 2001 From: guenther <> Date: Fri, 11 Sep 2015 09:18:27 +0000 Subject: Wrap blowfish, sha*, md5, and rmd160 so that internal calls go direct ok deraadt@ --- src/lib/libc/include/namespace.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/lib/libc/include/namespace.h') diff --git a/src/lib/libc/include/namespace.h b/src/lib/libc/include/namespace.h index c8c864a266..cfdb95ad02 100644 --- a/src/lib/libc/include/namespace.h +++ b/src/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 /* 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. -- cgit v1.2.3-55-g6feb