diff options
Diffstat (limited to 'src/lib/libc/include/namespace.h')
-rw-r--r-- | src/lib/libc/include/namespace.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libc/include/namespace.h b/src/lib/libc/include/namespace.h index 73b845e10f..60766afc0b 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.11 2017/11/29 05:13:57 guenther Exp $ */ | 1 | /* $OpenBSD: namespace.h,v 1.12 2018/01/18 08:23:44 guenther Exp $ */ |
2 | 2 | ||
3 | #ifndef _LIBC_NAMESPACE_H_ | 3 | #ifndef _LIBC_NAMESPACE_H_ |
4 | #define _LIBC_NAMESPACE_H_ | 4 | #define _LIBC_NAMESPACE_H_ |
@@ -135,6 +135,8 @@ | |||
135 | 135 | ||
136 | #include <sys/cdefs.h> /* for __dso_hidden and __{weak,strong}_alias */ | 136 | #include <sys/cdefs.h> /* for __dso_hidden and __{weak,strong}_alias */ |
137 | 137 | ||
138 | #define __dso_protected __attribute__((__visibility__("protected"))) | ||
139 | |||
138 | #define HIDDEN(x) _libc_##x | 140 | #define HIDDEN(x) _libc_##x |
139 | #define CANCEL(x) _libc_##x##_cancel | 141 | #define CANCEL(x) _libc_##x##_cancel |
140 | #define WRAP(x) _libc_##x##_wrap | 142 | #define WRAP(x) _libc_##x##_wrap |
@@ -148,6 +150,7 @@ | |||
148 | #define PROTO_CANCEL(x) __dso_hidden typeof(x) HIDDEN(x), \ | 150 | #define PROTO_CANCEL(x) __dso_hidden typeof(x) HIDDEN(x), \ |
149 | x asm(CANCEL_STRING(x)) | 151 | x asm(CANCEL_STRING(x)) |
150 | #define PROTO_WRAP(x) PROTO_NORMAL(x), WRAP(x) | 152 | #define PROTO_WRAP(x) PROTO_NORMAL(x), WRAP(x) |
153 | #define PROTO_PROTECTED(x) __dso_protected typeof(x) x | ||
151 | 154 | ||
152 | #define DEF_STRONG(x) __strong_alias(x, HIDDEN(x)) | 155 | #define DEF_STRONG(x) __strong_alias(x, HIDDEN(x)) |
153 | #define DEF_WEAK(x) __weak_alias(x, HIDDEN(x)) | 156 | #define DEF_WEAK(x) __weak_alias(x, HIDDEN(x)) |
@@ -156,7 +159,7 @@ | |||
156 | #define DEF_SYS(x) __strong_alias(_thread_sys_##x, HIDDEN(x)) | 159 | #define DEF_SYS(x) __strong_alias(_thread_sys_##x, HIDDEN(x)) |
157 | #ifdef __clang__ | 160 | #ifdef __clang__ |
158 | #define DEF_BUILTIN(x) __asm("") | 161 | #define DEF_BUILTIN(x) __asm("") |
159 | #define BUILTIN __attribute__((__visibility__("protected"))) | 162 | #define BUILTIN __dso_protected |
160 | #else | 163 | #else |
161 | #define DEF_BUILTIN(x) DEF_STRONG(x) | 164 | #define DEF_BUILTIN(x) DEF_STRONG(x) |
162 | #define BUILTIN | 165 | #define BUILTIN |