From owner-svn-src-projects@FreeBSD.ORG Sun Jul 26 20:35:48 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35280106564A; Sun, 26 Jul 2009 20:35:48 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23AD38FC0A; Sun, 26 Jul 2009 20:35:48 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6QKZm3Z079652; Sun, 26 Jul 2009 20:35:48 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6QKZliu079650; Sun, 26 Jul 2009 20:35:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200907262035.n6QKZliu079650@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 26 Jul 2009 20:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195897 - projects/ppc64/contrib/binutils/bfd X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jul 2009 20:35:48 -0000 Author: nwhitehorn Date: Sun Jul 26 20:35:47 2009 New Revision: 195897 URL: http://svn.freebsd.org/changeset/base/195897 Log: Fix a segfault in ld when the PLT is defined but not used. This follows a similar change in 2006 made by Alan Modra. Modified: projects/ppc64/contrib/binutils/bfd/elf64-ppc.c Modified: projects/ppc64/contrib/binutils/bfd/elf64-ppc.c ============================================================================== --- projects/ppc64/contrib/binutils/bfd/elf64-ppc.c Sun Jul 26 20:12:06 2009 (r195896) +++ projects/ppc64/contrib/binutils/bfd/elf64-ppc.c Sun Jul 26 20:35:47 2009 (r195897) @@ -7206,7 +7206,7 @@ ppc64_elf_build_stubs (bfd_boolean emit_ stub_sec->_cooked_size = 0; } - if (htab->plt != NULL) + if (htab->glink != NULL && htab->glink->contents != NULL) { unsigned int indx; bfd_vma plt0;