summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2017-11-29 05:13:58 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2017-11-29 05:13:58 +0000
commitaeccbd44f9c3c13e18a62f78e7d5eec72cec27c2 (patch)
tree0b8f1ec0ff076aa5eae382b4801ed399cd43d5b5 /lib/libc/sys
parent91a797ffb7ddec4e824bd9414f45fd9cfa8503c6 (diff)
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 'lib/libc/sys')
-rw-r--r--lib/libc/sys/stack_protector.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/sys/stack_protector.c b/lib/libc/sys/stack_protector.c
index 116aecd316a..d9ecb2cfbb4 100644
--- a/lib/libc/sys/stack_protector.c
+++ b/lib/libc/sys/stack_protector.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stack_protector.c,v 1.23 2016/03/21 22:41:28 bluhm Exp $ */
+/* $OpenBSD: stack_protector.c,v 1.24 2017/11/29 05:13:57 guenther Exp $ */
/*
* Copyright (c) 2002 Hiroaki Etoh, Federico G. Schwindt, and Miodrag Vallat.
@@ -80,4 +80,4 @@ __stack_smash_handler(const char func[], int damaged)
_exit(127);
}
-DEF_STRONG(__stack_smash_handler);
+DEF_BUILTIN(__stack_smash_handler);