Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Oct 2009 19:05:43 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r198304 - in stable/8/lib/libc: . gen stdio stdtime string sys
Message-ID:  <200910201905.n9KJ5hPe075884@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kan
Date: Tue Oct 20 19:05:43 2009
New Revision: 198304
URL: http://svn.freebsd.org/changeset/base/198304

Log:
  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)

Modified:
  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)
  stable/8/lib/libc/sys/stack_protector.c

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);
+#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?200910201905.n9KJ5hPe075884>