aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-attrs.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-02-07 03:44:26 +0000
committerAlan Modra <amodra@gmail.com>2013-02-07 03:44:26 +0000
commitdafbc74d2c30322553791e940a3e7110be39ed10 (patch)
treecec4ac673ac389d8f3d43036be4a1479ae798829 /bfd/elf-attrs.c
parent20e52bd2b8041df10920960f5882636d420ebb13 (diff)
downloadgdb-dafbc74d2c30322553791e940a3e7110be39ed10.zip
gdb-dafbc74d2c30322553791e940a3e7110be39ed10.tar.gz
gdb-dafbc74d2c30322553791e940a3e7110be39ed10.tar.bz2
PR binutils/14873
* elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to copy attributes from or to non-ELF.
Diffstat (limited to 'bfd/elf-attrs.c')
-rw-r--r--bfd/elf-attrs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c
index 4237af5..9a6ff6f 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