diff options
Diffstat (limited to 'src/lib/libc/include')
-rw-r--r-- | src/lib/libc/include/namespace.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/libc/include/namespace.h b/src/lib/libc/include/namespace.h index 939515251e..c8c864a266 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.5 2015/09/06 20:26:20 guenther Exp $ */ | 1 | /* $OpenBSD: namespace.h,v 1.6 2015/09/10 18:13:46 guenther Exp $ */ |
2 | 2 | ||
3 | #ifndef _LIBC_NAMESPACE_H_ | 3 | #ifndef _LIBC_NAMESPACE_H_ |
4 | #define _LIBC_NAMESPACE_H_ | 4 | #define _LIBC_NAMESPACE_H_ |
@@ -126,6 +126,8 @@ | |||
126 | * ex: DEF_SYS(pread) | 126 | * ex: DEF_SYS(pread) |
127 | */ | 127 | */ |
128 | 128 | ||
129 | #include <sys/cdefs.h> /* for __dso_hidden and __{weak,strong}_alias */ | ||
130 | |||
129 | #define HIDDEN(x) _libc_##x | 131 | #define HIDDEN(x) _libc_##x |
130 | #define CANCEL(x) _libc_##x##_cancel | 132 | #define CANCEL(x) _libc_##x##_cancel |
131 | #define WRAP(x) _libc_##x##_wrap | 133 | #define WRAP(x) _libc_##x##_wrap |
@@ -144,5 +146,19 @@ | |||
144 | #define DEF_WRAP(x) __weak_alias(x, WRAP(x)) | 146 | #define DEF_WRAP(x) __weak_alias(x, WRAP(x)) |
145 | #define DEF_SYS(x) __strong_alias(_thread_sys_##x, HIDDEN(x)) | 147 | #define DEF_SYS(x) __strong_alias(_thread_sys_##x, HIDDEN(x)) |
146 | 148 | ||
149 | |||
150 | /* | ||
151 | * gcc will generate calls to the functions below. | ||
152 | * Declare and redirect them here so we always go | ||
153 | * directly to our hidden aliases. | ||
154 | */ | ||
155 | #include <sys/_types.h> | ||
156 | void *memcpy(void *__restrict, const void *__restrict, __size_t); | ||
157 | void *memset(void *, int, __size_t); | ||
158 | void __stack_smash_handler(const char [], int __attribute__((__unused__))); | ||
159 | PROTO_NORMAL(memcpy); | ||
160 | PROTO_NORMAL(memset); | ||
161 | PROTO_NORMAL(__stack_smash_handler); | ||
162 | |||
147 | #endif /* _LIBC_NAMESPACE_H_ */ | 163 | #endif /* _LIBC_NAMESPACE_H_ */ |
148 | 164 | ||