From owner-svn-src-all@FreeBSD.ORG Thu Sep 17 13:21:54 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 18A7F1065679; Thu, 17 Sep 2009 13:21:54 +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 06FDC8FC13; Thu, 17 Sep 2009 13:21:54 +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 n8HDLrD0058176; Thu, 17 Sep 2009 13:21:53 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8HDLr8d058174; Thu, 17 Sep 2009 13:21:53 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <200909171321.n8HDLr8d058174@svn.freebsd.org> From: Alexander Kabaev Date: Thu, 17 Sep 2009 13:21:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197277 - head/lib/libc/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: Thu, 17 Sep 2009 13:21:54 -0000 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