diff options
author | Alan Modra <amodra@bigpond.net.au> | 2013-02-07 03:44:26 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2013-02-07 03:44:26 +0000 |
commit | 60ae86f47a1e9b6d8295c7286addc1c26ff0a192 (patch) | |
tree | eac186f24a14a565477bbe01f61790dd7f61525b | |
parent | 6396600033c665c7c493142b490bd13ae3fc1ded (diff) | |
download | binutils-redhat-60ae86f47a1e9b6d8295c7286addc1c26ff0a192.tar.gz |
PR binutils/14873
* elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to
copy attributes from or to non-ELF.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf-attrs.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 50ed06f6fc..c13b5bc712 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2013-02-07 Alan Modra <amodra@gmail.com> + + 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 <hongjiu.lu@intel.com> * 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 4237af58eb..9a6ff6f910 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 |