diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/include/namespace.h | 11 |
1 files changed, 10 insertions, 1 deletions
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 @@ | |||
| 1 | /* $OpenBSD: namespace.h,v 1.6 2015/09/10 18:13:46 guenther Exp $ */ | 1 | /* $OpenBSD: namespace.h,v 1.7 2015/09/11 09:18:27 guenther Exp $ */ |
| 2 | 2 | ||
| 3 | #ifndef _LIBC_NAMESPACE_H_ | 3 | #ifndef _LIBC_NAMESPACE_H_ |
| 4 | #define _LIBC_NAMESPACE_H_ | 4 | #define _LIBC_NAMESPACE_H_ |
| @@ -124,6 +124,12 @@ | |||
| 124 | * only be needed for syscalls that have C instead of asm stubs. | 124 | * only be needed for syscalls that have C instead of asm stubs. |
| 125 | * Matches with PROTO_NORMAL(), PROTO_CANCEL(), or PROTO_WRAP() | 125 | * Matches with PROTO_NORMAL(), PROTO_CANCEL(), or PROTO_WRAP() |
| 126 | * ex: DEF_SYS(pread) | 126 | * ex: DEF_SYS(pread) |
| 127 | * | ||
| 128 | * MAKE_CLONE(dst, src) Symbols that are exact clones of other symbols | ||
| 129 | * This declares _libc_dst as being the same type as dst, and makes | ||
| 130 | * _libc_dst a strong, hidden alias for _libc_src. You still need to | ||
| 131 | * DEF_STRONG(dst) or DEF_WEAK(dst) to alias dst itself | ||
| 132 | * ex: MAKE_CLONE(SHA224Pad, SHA256Pad) | ||
| 127 | */ | 133 | */ |
| 128 | 134 | ||
| 129 | #include <sys/cdefs.h> /* for __dso_hidden and __{weak,strong}_alias */ | 135 | #include <sys/cdefs.h> /* for __dso_hidden and __{weak,strong}_alias */ |
| @@ -146,6 +152,9 @@ | |||
| 146 | #define DEF_WRAP(x) __weak_alias(x, WRAP(x)) | 152 | #define DEF_WRAP(x) __weak_alias(x, WRAP(x)) |
| 147 | #define DEF_SYS(x) __strong_alias(_thread_sys_##x, HIDDEN(x)) | 153 | #define DEF_SYS(x) __strong_alias(_thread_sys_##x, HIDDEN(x)) |
| 148 | 154 | ||
| 155 | #define MAKE_CLONE(dst, src) __dso_hidden typeof(dst) HIDDEN(dst) \ | ||
| 156 | __attribute__((alias (HIDDEN_STRING(src)))) | ||
| 157 | |||
| 149 | 158 | ||
| 150 | /* | 159 | /* |
| 151 | * gcc will generate calls to the functions below. | 160 | * gcc will generate calls to the functions below. |
