Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jun 2010 19:10:28 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r208960 - projects/ppc64/contrib/binutils/bfd
Message-ID:  <201006091910.o59JASJk013876@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006091910.o59JASJk013876>