svn commit: r198304 - in stable/8/lib/libc: . gen stdio stdtime string sys

Alexander Kabaev kan at
Tue Oct 20 19:05:43 UTC 2009

Author: kan
Date: Tue Oct 20 19:05:43 2009
New Revision: 198304

  MFC Revision 197277:
  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.
  Approved by: re (kib)

  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/gen/   (props changed)
  stable/8/lib/libc/stdio/asprintf.c   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/string/ffsll.c   (props changed)
  stable/8/lib/libc/string/flsll.c   (props changed)
  stable/8/lib/libc/string/wcpcpy.c   (props changed)
  stable/8/lib/libc/string/wcpncpy.c   (props changed)

Modified: stable/8/lib/libc/sys/stack_protector.c
--- stable/8/lib/libc/sys/stack_protector.c	Tue Oct 20 18:58:28 2009	(r198303)
+++ stable/8/lib/libc/sys/stack_protector.c	Tue Oct 20 19:05:43 2009	(r198304)
@@ -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);
+__weak_reference(__stack_chk_fail, __stack_chk_fail_local);

More information about the svn-src-stable-8 mailing list