3f8308f
*** ../binutils-2.20.51.0.2.copy-patched/bfd/elf.c	2010-03-02 14:37:43.000000000 +0000
3f8308f
--- bfd/elf.c	2010-03-02 14:39:27.000000000 +0000
3f8308f
*************** _bfd_elf_copy_private_bfd_data (bfd *ibf
3f8308f
*** 1069,1074 ****
3f8308f
--- 1069,1081 ----
3f8308f
    /* Copy object attributes.  */
3f8308f
    _bfd_elf_copy_obj_attributes (ibfd, obfd);
3f8308f
  
3f8308f
+   /* If the input BFD has the OSABI field set and the
3f8308f
+      output BFD does not, then copy the value.  */
3f8308f
+   if (elf_elfheader (ibfd)->e_ident [EI_OSABI] != ELFOSABI_NONE
3f8308f
+       && elf_elfheader (obfd)->e_ident [EI_OSABI] == ELFOSABI_NONE)
3f8308f
+     elf_elfheader (obfd)->e_ident [EI_OSABI] =
3f8308f
+       elf_elfheader (ibfd)->e_ident [EI_OSABI];
3f8308f
+ 
3f8308f
    return TRUE;
3f8308f
  }
3f8308f