From owner-svn-src-stable@FreeBSD.ORG Mon Dec 31 14:21:52 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A63BF99; Mon, 31 Dec 2012 14:21:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3E8208FC12; Mon, 31 Dec 2012 14:21:52 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBVELqA2049127; Mon, 31 Dec 2012 14:21:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBVELqfp049126; Mon, 31 Dec 2012 14:21:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201212311421.qBVELqfp049126@svn.freebsd.org> From: Dimitry Andric Date: Mon, 31 Dec 2012 14:21:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244906 - stable/7/contrib/binutils/bfd X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 14:21:52 -0000 Author: dim Date: Mon Dec 31 14:21:51 2012 New Revision: 244906 URL: http://svnweb.freebsd.org/changeset/base/244906 Log: MFC r244600: Fix a bug in ld --gc-sections: it strips out .note sections, while it should never do so. This can cause global constructors and destructors to not be executed at run-time, resulting in crashes and other strange behaviour. Reported by: rene Modified: stable/7/contrib/binutils/bfd/elflink.c Directory Properties: stable/7/contrib/binutils/ (props changed) Modified: stable/7/contrib/binutils/bfd/elflink.c ============================================================================== --- stable/7/contrib/binutils/bfd/elflink.c Mon Dec 31 14:21:41 2012 (r244905) +++ stable/7/contrib/binutils/bfd/elflink.c Mon Dec 31 14:21:51 2012 (r244906) @@ -8248,6 +8248,7 @@ elf_gc_sweep (struct bfd_link_info *info { /* Keep special sections. Keep .debug sections. */ if ((o->flags & SEC_LINKER_CREATED) + || elf_section_data (o)->this_hdr.sh_type == SHT_NOTE || (o->flags & SEC_DEBUGGING)) o->gc_mark = 1;