summaryrefslogtreecommitdiffstats
path: root/binutils-2.20.51.0.10-copy-osabi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.20.51.0.10-copy-osabi.patch')
-rw-r--r--binutils-2.20.51.0.10-copy-osabi.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/binutils-2.20.51.0.10-copy-osabi.patch b/binutils-2.20.51.0.10-copy-osabi.patch
new file mode 100644
index 0000000..86cb447
--- /dev/null
+++ b/binutils-2.20.51.0.10-copy-osabi.patch
@@ -0,0 +1,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;
+ }
+