From owner-svn-src-projects@FreeBSD.ORG Wed Jun 9 19:10:28 2010 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 522BB106566B; Wed, 9 Jun 2010 19:10:28 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41F738FC08; Wed, 9 Jun 2010 19:10:28 +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 o59JAS79013878; Wed, 9 Jun 2010 19:10:28 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o59JASJk013876; Wed, 9 Jun 2010 19:10:28 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201006091910.o59JASJk013876@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 9 Jun 2010 19:10:28 +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: r208960 - 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: Wed, 09 Jun 2010 19:10:28 -0000 Author: nwhitehorn Date: Wed Jun 9 19:10:27 2010 New Revision: 208960 URL: http://svn.freebsd.org/changeset/base/208960 Log: Fix yet another bug in binutils 2.15 in which objcopy could segfault when making a PPC64 ELF file from something that was not an ELF file (e.g. binary input). This caused intermittent crashes while building uathload on PPC64. Reported by: Yannick Bertin, Andreas Tobler 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 Wed Jun 9 19:09:49 2010 (r208959) +++ projects/ppc64/contrib/binutils/bfd/elf64-ppc.c Wed Jun 9 19:10:27 2010 (r208960) @@ -6033,6 +6033,10 @@ ppc64_elf_size_dynamic_sections (bfd *ou for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next) { + /* Skip this BFD if it is not ELF */ + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour) + continue; + s = ppc64_elf_tdata (ibfd)->got; if (s != NULL && s != htab->got) { @@ -9000,6 +9004,10 @@ ppc64_elf_finish_dynamic_sections (bfd * while ((dynobj = dynobj->link_next) != NULL) { asection *s; + + if (bfd_get_flavour (dynobj) != bfd_target_elf_flavour) + continue; + s = ppc64_elf_tdata (dynobj)->got; if (s != NULL && s->_raw_size != 0