From owner-svn-src-all@FreeBSD.ORG Tue Sep 7 12:06:42 2010 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 014F01065694; Tue, 7 Sep 2010 12:06:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9DB28FC18; Tue, 7 Sep 2010 12:06:41 +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 o87C6fGE097197; Tue, 7 Sep 2010 12:06:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o87C6fBP097193; Tue, 7 Sep 2010 12:06:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009071206.o87C6fBP097193@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 7 Sep 2010 12:06:41 +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: r212290 - stable/8/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: Tue, 07 Sep 2010 12:06:42 -0000 Author: kib Date: Tue Sep 7 12:06:41 2010 New Revision: 212290 URL: http://svn.freebsd.org/changeset/base/212290 Log: MFC r211748: Move the __stack_chk_fail_local@FBSD_1.0 compat symbol definition into the separate .o for libc_pic.a. This prevents rtld from making the symbol global. Added: stable/8/lib/libc/sys/stack_protector_compat.c - copied unchanged from r211748, head/lib/libc/sys/stack_protector_compat.c Modified: stable/8/lib/libc/sys/Makefile.inc stable/8/lib/libc/sys/stack_protector.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/sys/Makefile.inc ============================================================================== --- stable/8/lib/libc/sys/Makefile.inc Tue Sep 7 12:04:07 2010 (r212289) +++ stable/8/lib/libc/sys/Makefile.inc Tue Sep 7 12:06:41 2010 (r212290) @@ -18,7 +18,7 @@ .endif # Sources common to both syscall interfaces: -SRCS+= stack_protector.c __error.c +SRCS+= stack_protector.c stack_protector_compat.c __error.c .if !defined(WITHOUT_SYSCALL_COMPAT) SRCS+= fcntl.c ftruncate.c lseek.c mmap.c pread.c pwrite.c truncate.c PSEUDO+= _fcntl.o Modified: stable/8/lib/libc/sys/stack_protector.c ============================================================================== --- stable/8/lib/libc/sys/stack_protector.c Tue Sep 7 12:04:07 2010 (r212289) +++ stable/8/lib/libc/sys/stack_protector.c Tue Sep 7 12:06:41 2010 (r212290) @@ -107,8 +107,6 @@ __chk_fail(void) __fail("buffer overflow detected; terminated"); } -#ifdef PIC -__sym_compat(__stack_chk_fail_local, __stack_chk_fail, FBSD_1.0); -#else +#ifndef PIC __weak_reference(__stack_chk_fail, __stack_chk_fail_local); #endif Copied: stable/8/lib/libc/sys/stack_protector_compat.c (from r211748, head/lib/libc/sys/stack_protector_compat.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/libc/sys/stack_protector_compat.c Tue Sep 7 12:06:41 2010 (r212290, copy of r211748, head/lib/libc/sys/stack_protector_compat.c) @@ -0,0 +1,20 @@ +/* + * Written by Alexander Kabaev + * The file is in public domain. + */ + +#include +__FBSDID("$FreeBSD$"); + +void __stack_chk_fail(void); + +#ifdef PIC +void +__stack_chk_fail_local_hidden(void) +{ + + __stack_chk_fail(); +} + +__sym_compat(__stack_chk_fail_local, __stack_chk_fail_local_hidden, FBSD_1.0); +#endif