summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/sys/stack_protector.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/sys/stack_protector.c b/lib/libc/sys/stack_protector.c
index 63beebc..14c20eb 100644
--- a/lib/libc/sys/stack_protector.c
+++ b/lib/libc/sys/stack_protector.c
@@ -108,4 +108,8 @@ __chk_fail(void)
__fail("buffer overflow detected; terminated");
}
+#ifdef PIC
__sym_compat(__stack_chk_fail_local, __stack_chk_fail, FBSD_1.0);
+#else
+__weak_reference(__stack_chk_fail, __stack_chk_fail_local);
+#endif
OpenPOWER on IntegriCloud