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