Blame binutils-2.20.51.0.10-copy-osabi.patch

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