* ld/testsuite/ld-arm/arm-merge-incompatible.d: New test.
authorMatthew Gretton-Dann <matthew.gretton-dann@arm.com>
Tue, 2 Mar 2010 11:40:24 +0000 (11:40 +0000)
committerMatthew Gretton-Dann <matthew.gretton-dann@arm.com>
Tue, 2 Mar 2010 11:40:24 +0000 (11:40 +0000)
* ld/testsuite/ld-arm/arm-merge-incompatiblea.s: Likewise.
* ld/testsuite/ld-arm/arm-merge-incompatibleb.s: Likewise.
* ld/testsuite/ld-arm/arm-elf.exp: Run the new test.
* bfd/elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
return value from the call to _bfd_elf_merge_object_attributes.

bfd/ChangeLog
bfd/elf32-arm.c
ld/testsuite/ChangeLog
ld/testsuite/ld-arm/arm-elf.exp
ld/testsuite/ld-arm/attr-merge-incompatible.d [new file with mode: 0644]
ld/testsuite/ld-arm/attr-merge-incompatiblea.s [new file with mode: 0644]
ld/testsuite/ld-arm/attr-merge-incompatibleb.s [new file with mode: 0644]

index 1c0805436973c40cc9c8ba42ad63dedf8a7bfe43..d1ce00c365db797c8adc78cb3621c377129aeffb 100644 (file)
@@ -1,3 +1,8 @@
+2010-03-02  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
+
+       * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
+       return value from the call to _bfd_elf_merge_object_attributes.
+
 2010-03-02  Christophe Lyon  <christophe.lyon@st.com>
        Alan Modra  <amodra@gmail.com>
 
index fd4031568d537418d049af6b7ceaad8c476531ee..29fb29580f3e0cda5de5f65702766e18f404cd41 100644 (file)
@@ -10340,7 +10340,8 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
     }
 
   /* Merge Tag_compatibility attributes and any common GNU ones.  */
-  _bfd_elf_merge_object_attributes (ibfd, obfd);
+  if (!_bfd_elf_merge_object_attributes (ibfd, obfd))
+    return FALSE;
 
   /* Check for any attributes not known on ARM.  */
   in_list = elf_other_obj_attributes_proc (ibfd);
index 165261115cf76a295799e8e1f70be91c59098483..3ceacd48d0c9abd9df5a84e4d91a0764a79711d5 100644 (file)
@@ -1,3 +1,10 @@
+2010-03-02  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
+
+       * ld-arm/arm-merge-incompatible.d: New test.
+       * ld-arm/arm-merge-incompatiblea.s: Likewise.
+       * ld-arm/arm-merge-incompatibleb.s: Likewise.
+       * ld-arm/arm-elf.exp: Run the new test.
+
 2010-03-02  Christophe Lyon  <christophe.lyon@st.com>
        Alan Modra  <amodra@gmail.com>
 
index 87ea1875139607cec698d07681a93b834b5fc812..26552b9a053adb2e81e9c65d581ed65ebfd8e1a1 100644 (file)
@@ -510,3 +510,4 @@ run_dump_test "attr-merge-vfp-4"
 run_dump_test "attr-merge-vfp-4r"
 run_dump_test "attr-merge-vfp-5"
 run_dump_test "attr-merge-vfp-5r"
+run_dump_test "attr-merge-incompatible"
diff --git a/ld/testsuite/ld-arm/attr-merge-incompatible.d b/ld/testsuite/ld-arm/attr-merge-incompatible.d
new file mode 100644 (file)
index 0000000..41711da
--- /dev/null
@@ -0,0 +1,5 @@
+#source: attr-merge-incompatibleb.s
+#source: attr-merge-incompatiblea.s
+#as:
+#ld:
+#error: Object has vendor-specific contents that must be processed by the '.+' toolchain
diff --git a/ld/testsuite/ld-arm/attr-merge-incompatiblea.s b/ld/testsuite/ld-arm/attr-merge-incompatiblea.s
new file mode 100644 (file)
index 0000000..03e0f7e
--- /dev/null
@@ -0,0 +1 @@
+       .eabi_attribute Tag_compatibility, 1, "Random Toolchain Vendor"
diff --git a/ld/testsuite/ld-arm/attr-merge-incompatibleb.s b/ld/testsuite/ld-arm/attr-merge-incompatibleb.s
new file mode 100644 (file)
index 0000000..583d253
--- /dev/null
@@ -0,0 +1 @@
+       .eabi_attribute Tag_compatibility, 1, "gnu"