summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/memset.c
diff options
context:
space:
mode:
authorguenther <>2017-11-29 05:13:57 +0000
committerguenther <>2017-11-29 05:13:57 +0000
commit91809a23ddd15af26964fe79c11bc52b08afeb95 (patch)
tree4976229f4c71d61ceb103c7276e63e28e5ef1d31 /src/lib/libc/string/memset.c
parent5929e16c289458fb0cbcee595cab8746bac4a72f (diff)
downloadopenbsd-91809a23ddd15af26964fe79c11bc52b08afeb95.tar.gz
openbsd-91809a23ddd15af26964fe79c11bc52b08afeb95.tar.bz2
openbsd-91809a23ddd15af26964fe79c11bc52b08afeb95.zip
clang doesn't propagate attributes like "asm labels" and "visibility(hidden)"
to builtins like mem{set,cpy,move} and __stack_smash_handler. So, when building with clang, instead mark those as protected visibility to get rid of the PLT relocations. We can't take the address of them then, but that's ok: it's a build-time error not a run-time error. ok kettenis@
Diffstat (limited to 'src/lib/libc/string/memset.c')
-rw-r--r--src/lib/libc/string/memset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/string/memset.c b/src/lib/libc/string/memset.c
index 242529ee0f..0c261f0965 100644
--- a/src/lib/libc/string/memset.c
+++ b/src/lib/libc/string/memset.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: memset.c,v 1.7 2015/08/31 02:53:57 guenther Exp $ */ 1/* $OpenBSD: memset.c,v 1.8 2017/11/29 05:13:57 guenther Exp $ */
2/*- 2/*-
3 * Copyright (c) 1990 The Regents of the University of California. 3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -45,4 +45,4 @@ memset(void *dst, int c, size_t n)
45 } 45 }
46 return (dst); 46 return (dst);
47} 47}
48DEF_STRONG(memset); 48DEF_BUILTIN(memset);