aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2007-07-03 15:21:30 +0000
committerJoseph Myers <joseph@codesourcery.com>2007-07-03 15:21:30 +0000
commit3cfad14c4a2b29ed8939e8e749b2a1c2f2b15f9e (patch)
treeaf6a721dc80507ad8a9cd765e9a0a1cc4b2f0ab3 /bfd
parentcd123cb70c845b890eed231a84e6e84c92c2ef92 (diff)
downloadbinutils-3cfad14c4a2b29ed8939e8e749b2a1c2f2b15f9e.zip
binutils-3cfad14c4a2b29ed8939e8e749b2a1c2f2b15f9e.tar.gz
binutils-3cfad14c4a2b29ed8939e8e749b2a1c2f2b15f9e.tar.bz2
bfd:
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Copy type from input attributes if value has been copied. ld/testsuite: * ld-arm/attr-merge-2a.s, ld-arm/attr-merge-2b.s, ld-arm/attr-merge-2.attr: New. * ld-arm/arm-elf.exp (armelftests): Add new test.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-arm.c17
2 files changed, 22 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 50226f2..8565680 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-03 Joseph Myers <joseph@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_merge_eabi_attributes): Copy type from
+ input attributes if value has been copied.
+
2007-07-03 Nick Clifton <nickc@redhat.com>
* COPYING: Replace with GPLv3 text.
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index e335888..ab47558 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -6934,6 +6934,23 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
default: /* All known attributes should be explicitly covered. */
abort ();
}
+
+ if (in_attr[i].type && !out_attr[i].type)
+ switch (in_attr[i].type)
+ {
+ case 1:
+ if (out_attr[i].i)
+ out_attr[i].type = 1;
+ break;
+
+ case 2:
+ if (out_attr[i].s)
+ out_attr[i].type = 2;
+ break;
+
+ default:
+ abort ();
+ }
}
/* Merge Tag_compatibility attributes and any common GNU ones. */