cb347a4
--- a/bfd/elf.c	2010-08-10 15:04:55.000000000 +0100
cb347a4
+++ b/bfd/elf.c	2010-08-10 15:05:42.000000000 +0100
cb347a4
@@ -1074,6 +1074,14 @@
cb347a4
 
cb347a4
   /* Copy object attributes.  */
cb347a4
   _bfd_elf_copy_obj_attributes (ibfd, obfd);
cb347a4
+
cb347a4
+  /* If the input BFD has the OSABI field set and the
cb347a4
+     output BFD does not, then copy the value.  */
cb347a4
+  if (elf_elfheader (ibfd)->e_ident [EI_OSABI] != ELFOSABI_NONE
cb347a4
+      && elf_elfheader (obfd)->e_ident [EI_OSABI] == ELFOSABI_NONE)
cb347a4
+    elf_elfheader (obfd)->e_ident [EI_OSABI] =
cb347a4
+      elf_elfheader (ibfd)->e_ident [EI_OSABI];
cb347a4
+
cb347a4
   return TRUE;
cb347a4
 }
cb347a4