svn commit: r197277 - head/lib/libc/sys
Alexander Kabaev
kan at FreeBSD.org
Thu Sep 17 13:21:54 UTC 2009
Author: kan
Date: Thu Sep 17 13:21:53 2009
New Revision: 197277
URL: http://svn.freebsd.org/changeset/base/197277
Log:
Make libc.a provide __stack_chk_fail_local weak alias. This is
needed to satisfy static libraries that are compiled with -fpic
and linked into static binary afterwards. Several libraries in
gcc are examples of such static libs.
Modified:
head/lib/libc/sys/stack_protector.c
Modified: head/lib/libc/sys/stack_protector.c
==============================================================================
--- head/lib/libc/sys/stack_protector.c Thu Sep 17 13:12:24 2009 (r197276)
+++ head/lib/libc/sys/stack_protector.c Thu Sep 17 13:21:53 2009 (r197277)
@@ -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
More information about the svn-src-all
mailing list