Date: Thu, 17 Sep 2009 13:21:53 +0000 (UTC) From: Alexander Kabaev <kan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r197277 - head/lib/libc/sys Message-ID: <200909171321.n8HDLr8d058174@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909171321.n8HDLr8d058174>