summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-tic6x
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-10-29 16:47:51 +0000
committerJoseph Myers <joseph@codesourcery.com>2010-10-29 16:47:51 +0000
commitd4e895e4765c8fcb67df9cbb0a31ff0fdd3c2882 (patch)
treee736ec76e84738858909c14d8e5d535d2c6c66dc /ld/testsuite/ld-tic6x
parent0eef930edd6562c8658bb4f369780acc9c12f1a2 (diff)
downloadbinutils-redhat-d4e895e4765c8fcb67df9cbb0a31ff0fdd3c2882.tar.gz
bfd:
* elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Check Tag_ABI_compatibility not Tag_compatibility. (elf32_tic6x_merge_attributes): Update compatibility attribute name in comment. Return FALSE if merging common attributes fails. binutils: * readelf.c (display_tic6x_attribute): Use Tag_ABI_compatibility not hardcoded 32. Display name of this attribute. gas: * doc/c-tic6x.texi (TIC6X Directives): Mention Tag_ABI_compatibility. gas/testsuite: * gas/tic6x/attr-compatibility-directive-1.d, gas/tic6x/attr-compatibility-directive-1.s, gas/tic6x/attr-compatibility-directive-2.d, gas/tic6x/attr-compatibility-directive-2.s: New tests. include/elf: * tic6x-attrs.h (Tag_ABI_compatibility): Define. ld/testsuite: * ld-tic6x/attr-compatibility-gnu-gnu.d, ld-tic6x/attr-compatibility-gnu-other.d, ld-tic6x/attr-compatibility-gnu.s, ld-tic6x/attr-compatibility-other-gnu.d, ld-tic6x/attr-compatibility-other-other.d, ld-tic6x/attr-compatibility-other.s: New tests.
Diffstat (limited to 'ld/testsuite/ld-tic6x')
-rw-r--r--ld/testsuite/ld-tic6x/attr-compatibility-gnu-gnu.d11
-rw-r--r--ld/testsuite/ld-tic6x/attr-compatibility-gnu-other.d6
-rw-r--r--ld/testsuite/ld-tic6x/attr-compatibility-gnu.s1
-rw-r--r--ld/testsuite/ld-tic6x/attr-compatibility-other-gnu.d6
-rw-r--r--ld/testsuite/ld-tic6x/attr-compatibility-other-other.d6
-rw-r--r--ld/testsuite/ld-tic6x/attr-compatibility-other.s1
6 files changed, 31 insertions, 0 deletions
diff --git a/ld/testsuite/ld-tic6x/attr-compatibility-gnu-gnu.d b/ld/testsuite/ld-tic6x/attr-compatibility-gnu-gnu.d
new file mode 100644
index 0000000000..4cba64ef26
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-compatibility-gnu-gnu.d
@@ -0,0 +1,11 @@
+#name: C6X compatibility attribute merging, gnu gnu
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-compatibility-gnu.s
+#source: attr-compatibility-gnu.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_compatibility: flag = 1, vendor = gnu
diff --git a/ld/testsuite/ld-tic6x/attr-compatibility-gnu-other.d b/ld/testsuite/ld-tic6x/attr-compatibility-gnu-other.d
new file mode 100644
index 0000000000..423ab07516
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-compatibility-gnu-other.d
@@ -0,0 +1,6 @@
+#name: C6X compatibility attribute merging, gnu other
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-compatibility-gnu.s
+#source: attr-compatibility-other.s
+#error: .*Object has vendor-specific contents that must be processed by the 'other' toolchain
diff --git a/ld/testsuite/ld-tic6x/attr-compatibility-gnu.s b/ld/testsuite/ld-tic6x/attr-compatibility-gnu.s
new file mode 100644
index 0000000000..b0130587b3
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-compatibility-gnu.s
@@ -0,0 +1 @@
+.c6xabi_attribute Tag_ABI_compatibility, 1, "gnu"
diff --git a/ld/testsuite/ld-tic6x/attr-compatibility-other-gnu.d b/ld/testsuite/ld-tic6x/attr-compatibility-other-gnu.d
new file mode 100644
index 0000000000..80d73e50fa
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-compatibility-other-gnu.d
@@ -0,0 +1,6 @@
+#name: C6X compatibility attribute merging, other gnu
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-compatibility-other.s
+#source: attr-compatibility-gnu.s
+#error: .*Object tag '1, gnu' is incompatible with tag '1, other'
diff --git a/ld/testsuite/ld-tic6x/attr-compatibility-other-other.d b/ld/testsuite/ld-tic6x/attr-compatibility-other-other.d
new file mode 100644
index 0000000000..0ebd99be9c
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-compatibility-other-other.d
@@ -0,0 +1,6 @@
+#name: C6X compatibility attribute merging, other other
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-compatibility-other.s
+#source: attr-compatibility-other.s
+#error: .*Object has vendor-specific contents that must be processed by the 'other' toolchain
diff --git a/ld/testsuite/ld-tic6x/attr-compatibility-other.s b/ld/testsuite/ld-tic6x/attr-compatibility-other.s
new file mode 100644
index 0000000000..38a605a4b0
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-compatibility-other.s
@@ -0,0 +1 @@
+.c6xabi_attribute Tag_ABI_compatibility, 1, "other"