Blob Blame History Raw
*** ../binutils-2.20.51.0.10.original/bfd/elf.c	2010-08-10 15:04:55.000000000 +0100
--- bfd/elf.c	2010-08-10 15:05:42.000000000 +0100
*************** _bfd_elf_copy_private_bfd_data (bfd *ibf
*** 1074,1079 ****
--- 1074,1087 ----
  
    /* Copy object attributes.  */
    _bfd_elf_copy_obj_attributes (ibfd, obfd);
+ 
+   /* If the input BFD has the OSABI field set and the
+      output BFD does not, then copy the value.  */
+   if (elf_elfheader (ibfd)->e_ident [EI_OSABI] != ELFOSABI_NONE
+       && elf_elfheader (obfd)->e_ident [EI_OSABI] == ELFOSABI_NONE)
+     elf_elfheader (obfd)->e_ident [EI_OSABI] =
+       elf_elfheader (ibfd)->e_ident [EI_OSABI];
+ 
    return TRUE;
  }