aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2019-06-25 00:40:44 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2019-06-25 00:40:44 +0000
commitf62da49b2f17f279ddba946bf4bc7ba7247273a5 (patch)
tree041a7841c0913c7d28147defb90e33fda6390de3 /sys
parentda4961c796795b7337cd905b84be8dcf200d408c (diff)
downloadsrc-f62da49b2f17f279ddba946bf4bc7ba7247273a5.tar.gz
src-f62da49b2f17f279ddba946bf4bc7ba7247273a5.zip
powerpc: Transition to Secure-PLT, like most other OSs
Summary: PowerPC has two PLT models: BSS-PLT and Secure-PLT. BSS-PLT uses runtime code generation to generate the PLT stubs. Secure-PLT was introduced with GCC 4.1 and Binutils 2.17 (base has GCC 4.2.1 and Binutils 2.17), and is a more secure PLT format, using a read-only linkage table, with the dynamic linker populating a non-executable index table. This is the libc, rtld, and kernel support only. The toolchain and build parts will be updated separately. Reviewed By: nwhitehorn, bdragon, pfg Differential Revision: https://reviews.freebsd.org/D20598 MFC after: 1 month
Notes
Notes: svn path=/head/; revision=349350
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/powerpc/machdep.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c
index 6fb874e31d9c..0bd6a11197ab 100644
--- a/sys/powerpc/powerpc/machdep.c
+++ b/sys/powerpc/powerpc/machdep.c
@@ -595,3 +595,16 @@ bzero(void *buf, size_t len)
len--;
}
}
+
+/* __stack_chk_fail_local() is called in secure-plt (32-bit). */
+#if !defined(__powerpc64__)
+extern void __stack_chk_fail(void);
+void __stack_chk_fail_local(void);
+
+void
+__stack_chk_fail_local(void)
+{
+
+ __stack_chk_fail();
+}
+#endif