From owner-svn-src-all@FreeBSD.ORG Tue Oct 20 19:05:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74190106566C; Tue, 20 Oct 2009 19:05:43 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 622B18FC1F; Tue, 20 Oct 2009 19:05:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9KJ5hPe075886; Tue, 20 Oct 2009 19:05:43 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9KJ5hPe075884; Tue, 20 Oct 2009 19:05:43 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <200910201905.n9KJ5hPe075884@svn.freebsd.org> From: Alexander Kabaev Date: Tue, 20 Oct 2009 19:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198304 - in stable/8/lib/libc: . gen stdio stdtime string sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2009 19:05:43 -0000 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