aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/secure/stack_protector_compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/secure/stack_protector_compat.c')
-rw-r--r--lib/libc/secure/stack_protector_compat.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/libc/secure/stack_protector_compat.c b/lib/libc/secure/stack_protector_compat.c
new file mode 100644
index 000000000000..1ca459222abe
--- /dev/null
+++ b/lib/libc/secure/stack_protector_compat.c
@@ -0,0 +1,18 @@
+/*
+ * Written by Alexander Kabaev <kan@FreeBSD.org>
+ * The file is in public domain.
+ */
+
+#include <sys/cdefs.h>
+void __stack_chk_fail(void);
+
+#ifdef PIC
+void
+__stack_chk_fail_local_hidden(void)
+{
+
+ __stack_chk_fail();
+}
+
+__sym_compat(__stack_chk_fail_local, __stack_chk_fail_local_hidden, FBSD_1.0);
+#endif