summaryrefslogtreecommitdiffstats
path: root/binutils-2.20.51.0.10-copy-osabi.patch
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-03-22 14:24:17 +0000
committerDavid Howells <dhowells@redhat.com>2012-03-22 14:27:04 +0000
commit172ecb81144c4ae6a69ae1bcf5d35881fb3b114a (patch)
treeaf6fbc2423fb5cb3490acfe77215da57bd6caac7 /binutils-2.20.51.0.10-copy-osabi.patch
parent23e8478641c5077a814f7648c9d92702fa1240a8 (diff)
downloadcross-binutils-172ecb81144c4ae6a69ae1bcf5d35881fb3b114a.tar.gz
cross-binutils-172ecb81144c4ae6a69ae1bcf5d35881fb3b114a.tar.xz
cross-binutils-172ecb81144c4ae6a69ae1bcf5d35881fb3b114a.zip
Initial import (#761619).
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;
+ }
+