]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR binutils/14873
authorAlan Modra <amodra@gmail.com>
Thu, 7 Feb 2013 03:44:41 +0000 (03:44 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 7 Feb 2013 03:44:41 +0000 (03:44 +0000)
* elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to
copy attributes from or to non-ELF.

bfd/ChangeLog
bfd/elf-attrs.c

index 17505e21868b9788275898c6bd30beaa256aa62c..1002477ad48b20922aaabc7f888f74d81e861440 100644 (file)
@@ -1,3 +1,9 @@
+2013-02-07  Alan Modra  <amodra@gmail.com>
+
+       PR binutils/14873
+       * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to
+       copy attributes from or to non-ELF.
+
 2013-02-01  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
index 4237af58eb749ae840e02b0ffd6096c7e2f45740..9a6ff6f910997ac7655950971d0dcee3f059004a 100644 (file)
@@ -347,6 +347,10 @@ _bfd_elf_copy_obj_attributes (bfd *ibfd, bfd *obfd)
   int i;
   int vendor;
 
+  if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+      || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+    return;
+
   for (vendor = OBJ_ATTR_FIRST; vendor <= OBJ_ATTR_LAST; vendor++)
     {
       in_attr