diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-11 09:18:28 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-11 09:18:28 +0000 |
commit | e3908c9da4f2a319b11d6aefbefd5ec8ebf12850 (patch) | |
tree | 40076993d1db5eadc6242eb3b7b8e7b48841aff9 /lib/libc/include | |
parent | dbad60886d4a45b1cb98367370f2998f762edac8 (diff) |
Wrap blowfish, sha*, md5, and rmd160 so that internal calls go direct
ok deraadt@
Diffstat (limited to 'lib/libc/include')
-rw-r--r-- | lib/libc/include/namespace.h | 11 |
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. |