From: Alan Modra Date: Thu, 7 Feb 2013 03:44:26 +0000 (+0000) Subject: PR binutils/14873 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dafbc74d2c30322553791e940a3e7110be39ed10;p=binutils-gdb.git PR binutils/14873 * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to copy attributes from or to non-ELF. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 50ed06f6fc6..c13b5bc712b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2013-02-07 Alan Modra + + PR binutils/14873 + * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to + copy attributes from or to non-ELF. + 2013-02-06 H.J. Lu * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't clear pc_count diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c index 4237af58eb7..9a6ff6f9109 100644 --- a/bfd/elf-attrs.c +++ b/bfd/elf-attrs.c @@ -347,6 +347,10 @@ _bfd_elf_copy_obj_attributes (bfd *ibfd, bfd *obfd) int i; int vendor; + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour + || bfd_get_flavour (obfd) != bfd_target_elf_flavour) + return; + for (vendor = OBJ_ATTR_FIRST; vendor <= OBJ_ATTR_LAST; vendor++) { in_attr