summaryrefslogtreecommitdiffstats
path: root/binutils-2.20.51.0.10-copy-osabi.patch
blob: 86cb44787fa1c79594e69ccacd3e234b8bd6b8ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
*** ../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;
  }