From owner-svn-src-all@FreeBSD.ORG Mon Dec 31 14:21:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A171E40; Mon, 31 Dec 2012 14:21:42 +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 5E00A8FC08; Mon, 31 Dec 2012 14:21:42 +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 qBVELgI9049066; Mon, 31 Dec 2012 14:21:42 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBVELgmM049065; Mon, 31 Dec 2012 14:21:42 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201212311421.qBVELgmM049065@svn.freebsd.org> From: Dimitry Andric Date: Mon, 31 Dec 2012 14:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244905 - stable/8/contrib/binutils/bfd X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 31 Dec 2012 14:21:42 -0000 Author: dim Date: Mon Dec 31 14:21:41 2012 New Revision: 244905 URL: http://svnweb.freebsd.org/changeset/base/244905 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/8/contrib/binutils/bfd/elflink.c Directory Properties: stable/8/contrib/binutils/ (props changed) Modified: stable/8/contrib/binutils/bfd/elflink.c ============================================================================== --- stable/8/contrib/binutils/bfd/elflink.c Mon Dec 31 14:21:31 2012 (r244904) +++ stable/8/contrib/binutils/bfd/elflink.c Mon Dec 31 14:21:41 2012 (r244905) @@ -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;