aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
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/elf32-arm.c
parentcd123cb70c845b890eed231a84e6e84c92c2ef92 (diff)
downloadgdb-3cfad14c4a2b29ed8939e8e749b2a1c2f2b15f9e.zip
gdb-3cfad14c4a2b29ed8939e8e749b2a1c2f2b15f9e.tar.gz
gdb-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/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c17
1 files changed, 17 insertions, 0 deletions
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. */