From ccc2cef693f2f02fa55024c17c959c78003839d9 Mon Sep 17 00:00:00 2001 From: kib Date: Tue, 24 Aug 2010 12:58:54 +0000 Subject: Move the __stack_chk_fail_local@FBSD_1.0 compat symbol definition into the separate .o for libc_pic.a. This prevents rtld from making the symbol global. Putting the stack_protector_compat.c into the public domain acknowledged by kan. Reviewed by: kan MFC after: 2 weeks --- lib/libc/sys/stack_protector_compat.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/libc/sys/stack_protector_compat.c (limited to 'lib/libc/sys/stack_protector_compat.c') diff --git a/lib/libc/sys/stack_protector_compat.c b/lib/libc/sys/stack_protector_compat.c new file mode 100644 index 0000000..cacb863 --- /dev/null +++ b/lib/libc/sys/stack_protector_compat.c @@ -0,0 +1,20 @@ +/* + * Written by Alexander Kabaev + * The file is in public domain. + */ + +#include +__FBSDID("$FreeBSD$"); + +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 -- cgit v1.1