aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-06-16 00:36:04 +0000
committerJoseph Myers <joseph@codesourcery.com>2010-06-16 00:36:04 +0000
commit59e6276b64b1a3b248d851e5a3f5acd63e346399 (patch)
tree67703b84ce60420523bc7446757adab7be390419 /ld
parentc562eb737ab97d1efc460606632f78bbb80169cb (diff)
downloadgdb-59e6276b64b1a3b248d851e5a3f5acd63e346399.zip
gdb-59e6276b64b1a3b248d851e5a3f5acd63e346399.tar.gz
gdb-59e6276b64b1a3b248d851e5a3f5acd63e346399.tar.bz2
bfd:
* elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2. * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type, elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes, elf32_tic6x_merge_private_bfd_data): New. (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section, elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor): Define. * elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare. binutils: * readelf.c (display_tic6x_attribute, process_tic6x_specific): New. (process_arch_specific): Call process_tic6x_specific for EM_TI_C6000. gas: * config/tc-tic6x.c: Include elf/tic6x.h. (tic6x_arch_attribute, tic6x_seen_insns): New. (tic6x_arch_table, tic6x_arches): Add attribute values. (tic6x_use_arch): Handle attribute settings. (tic6x_attributes_set_explicitly, s_tic6x_c6xabi_attribute, tic6x_attribute_table, tic6x_attributes, tic6x_convert_symbolic_attribute): New. (md_pseudo_table): Add c6xabi_attribute. (md_assemble): Set tic6x_seen_insns and tic6x_arch_attribute. (tic6x_set_attribute_int, tic6x_set_attributes): New. (tic6x_end): Call tic6x_set_attributes. * config/tc-tic6x.h (CONVERT_SYMBOLIC_ATTRIBUTE): Define. (tic6x_convert_symbolic_attribute): Declare. gas/testsuite: * gas/elf/elf.exp: Set target_machine for tic6x-*-*. * gas/elf/section2.e-tic6x, gas/tic6x/attr-arch-directive-1.d, gas/tic6x/attr-arch-directive-1.s, gas/tic6x/attr-arch-directive-2.d, gas/tic6x/attr-arch-directive-2.s, gas/tic6x/attr-arch-directive-3.d, gas/tic6x/attr-arch-directive-3.s, gas/tic6x/attr-arch-directive-4.d, gas/tic6x/attr-arch-directive-4.s, gas/tic6x/attr-arch-directive-5.d, gas/tic6x/attr-arch-directive-5.s, gas/tic6x/attr-arch-opts-c62x.d, gas/tic6x/attr-arch-opts-c64x+.d, gas/tic6x/attr-arch-opts-c64x.d, gas/tic6x/attr-arch-opts-c674x.d, gas/tic6x/attr-arch-opts-c67x+.d, gas/tic6x/attr-arch-opts-c67x.d, gas/tic6x/attr-arch-opts-none-1.d, gas/tic6x/attr-arch-opts-none-2.d, gas/tic6x/attr-arch-opts-override-1.d, gas/tic6x/attr-arch-opts-override-2.d, gas/tic6x/empty.s: New. include/elf: * tic6x-attrs.h: New. * tic6x.h: Include elf/tic6x-attrs.h for attribute table. (C6XABI_Tag_CPU_arch_none, C6XABI_Tag_CPU_arch_C62X, C6XABI_Tag_CPU_arch_C67X, C6XABI_Tag_CPU_arch_C67XP, C6XABI_Tag_CPU_arch_C64X, C6XABI_Tag_CPU_arch_C64XP, C6XABI_Tag_CPU_arch_C674X): Define. ld: * emulparams/elf32_tic6x_le.sh (ATTRS_SECTIONS): Define. ld/testsuite: * ld-elf/orphan3.d: Allow section names starting '_'. * ld-tic6x/attr-arch-c62x-c62x.d, ld-tic6x/attr-arch-c62x-c64x+.d, ld-tic6x/attr-arch-c62x-c64x.d, ld-tic6x/attr-arch-c62x-c674x.d, ld-tic6x/attr-arch-c62x-c67x+.d, ld-tic6x/attr-arch-c62x-c67x.d, ld-tic6x/attr-arch-c62x.s, ld-tic6x/attr-arch-c64x+-c62x.d, ld-tic6x/attr-arch-c64x+-c64x+.d, ld-tic6x/attr-arch-c64x+-c64x.d, ld-tic6x/attr-arch-c64x+-c674x.d, ld-tic6x/attr-arch-c64x+-c67x+.d, ld-tic6x/attr-arch-c64x+-c67x.d, ld-tic6x/attr-arch-c64x+.s, ld-tic6x/attr-arch-c64x-c62x.d, ld-tic6x/attr-arch-c64x-c64x+.d, ld-tic6x/attr-arch-c64x-c64x.d, ld-tic6x/attr-arch-c64x-c674x.d, ld-tic6x/attr-arch-c64x-c67x+.d, ld-tic6x/attr-arch-c64x-c67x.d, ld-tic6x/attr-arch-c64x.s, ld-tic6x/attr-arch-c674x-c62x.d, ld-tic6x/attr-arch-c674x-c64x+.d, ld-tic6x/attr-arch-c674x-c64x.d, ld-tic6x/attr-arch-c674x-c674x.d, ld-tic6x/attr-arch-c674x-c67x+.d, ld-tic6x/attr-arch-c674x-c67x.d, ld-tic6x/attr-arch-c674x.s, ld-tic6x/attr-arch-c67x+-c62x.d, ld-tic6x/attr-arch-c67x+-c64x+.d, ld-tic6x/attr-arch-c67x+-c64x.d, ld-tic6x/attr-arch-c67x+-c674x.d, ld-tic6x/attr-arch-c67x+-c67x+.d, ld-tic6x/attr-arch-c67x+-c67x.d, ld-tic6x/attr-arch-c67x+.s, ld-tic6x/attr-arch-c67x-c62x.d, ld-tic6x/attr-arch-c67x-c64x+.d, ld-tic6x/attr-arch-c67x-c64x.d, ld-tic6x/attr-arch-c67x-c674x.d, ld-tic6x/attr-arch-c67x-c67x+.d, ld-tic6x/attr-arch-c67x-c67x.d, ld-tic6x/attr-arch-c67x.s: New.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/emulparams/elf32_tic6x_le.sh1
-rw-r--r--ld/testsuite/ChangeLog26
-rw-r--r--ld/testsuite/ld-elf/orphan3.d2
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c62x-c62x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c62x-c64x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c62x-c64x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c62x-c674x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c62x-c67x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c62x-c67x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c62x.s1
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x+-c62x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x+-c64x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x+-c64x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x+-c674x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x+-c67x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x+-c67x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x+.s1
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x-c62x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x-c64x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x-c64x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x-c674x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x-c67x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x-c67x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c64x.s1
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c674x-c62x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c674x-c64x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c674x-c64x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c674x-c674x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c674x-c67x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c674x-c67x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c674x.s1
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x+-c62x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x+-c64x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x+-c64x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x+-c674x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x+-c67x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x+-c67x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x+.s1
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x-c62x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x-c64x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x-c64x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x-c674x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x-c67x+.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x-c67x.d10
-rw-r--r--ld/testsuite/ld-tic6x/attr-arch-c67x.s1
46 files changed, 398 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c7f5202..3aa9c71 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-15 Joseph Myers <joseph@codesourcery.com>
+
+ * emulparams/elf32_tic6x_le.sh (ATTRS_SECTIONS): Define.
+
2010-06-09 Dave Korn <dave.korn.cygwin@gmail.com>
PR ld/11603
diff --git a/ld/emulparams/elf32_tic6x_le.sh b/ld/emulparams/elf32_tic6x_le.sh
index ee41f4f..fca0c7f 100644
--- a/ld/emulparams/elf32_tic6x_le.sh
+++ b/ld/emulparams/elf32_tic6x_le.sh
@@ -37,3 +37,4 @@ OTHER_BSS_SECTIONS="
. += 0x100000;
_STACK_START = .;
}"
+ATTRS_SECTIONS='__TI_build_attributes 0 : { KEEP (*(__TI_build_attributes)) KEEP (*(.gnu.attributes)) }'
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 162f166..03ee49d 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,29 @@
+2010-06-15 Joseph Myers <joseph@codesourcery.com>
+
+ * ld-elf/orphan3.d: Allow section names starting '_'.
+ * ld-tic6x/attr-arch-c62x-c62x.d, ld-tic6x/attr-arch-c62x-c64x+.d,
+ ld-tic6x/attr-arch-c62x-c64x.d, ld-tic6x/attr-arch-c62x-c674x.d,
+ ld-tic6x/attr-arch-c62x-c67x+.d, ld-tic6x/attr-arch-c62x-c67x.d,
+ ld-tic6x/attr-arch-c62x.s, ld-tic6x/attr-arch-c64x+-c62x.d,
+ ld-tic6x/attr-arch-c64x+-c64x+.d, ld-tic6x/attr-arch-c64x+-c64x.d,
+ ld-tic6x/attr-arch-c64x+-c674x.d,
+ ld-tic6x/attr-arch-c64x+-c67x+.d, ld-tic6x/attr-arch-c64x+-c67x.d,
+ ld-tic6x/attr-arch-c64x+.s, ld-tic6x/attr-arch-c64x-c62x.d,
+ ld-tic6x/attr-arch-c64x-c64x+.d, ld-tic6x/attr-arch-c64x-c64x.d,
+ ld-tic6x/attr-arch-c64x-c674x.d, ld-tic6x/attr-arch-c64x-c67x+.d,
+ ld-tic6x/attr-arch-c64x-c67x.d, ld-tic6x/attr-arch-c64x.s,
+ ld-tic6x/attr-arch-c674x-c62x.d, ld-tic6x/attr-arch-c674x-c64x+.d,
+ ld-tic6x/attr-arch-c674x-c64x.d, ld-tic6x/attr-arch-c674x-c674x.d,
+ ld-tic6x/attr-arch-c674x-c67x+.d, ld-tic6x/attr-arch-c674x-c67x.d,
+ ld-tic6x/attr-arch-c674x.s, ld-tic6x/attr-arch-c67x+-c62x.d,
+ ld-tic6x/attr-arch-c67x+-c64x+.d, ld-tic6x/attr-arch-c67x+-c64x.d,
+ ld-tic6x/attr-arch-c67x+-c674x.d,
+ ld-tic6x/attr-arch-c67x+-c67x+.d, ld-tic6x/attr-arch-c67x+-c67x.d,
+ ld-tic6x/attr-arch-c67x+.s, ld-tic6x/attr-arch-c67x-c62x.d,
+ ld-tic6x/attr-arch-c67x-c64x+.d, ld-tic6x/attr-arch-c67x-c64x.d,
+ ld-tic6x/attr-arch-c67x-c674x.d, ld-tic6x/attr-arch-c67x-c67x+.d,
+ ld-tic6x/attr-arch-c67x-c67x.d, ld-tic6x/attr-arch-c67x.s: New.
+
2010-06-07 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* ld-arm/arm-call.d: Handle change in lsls/movs disassembly.
diff --git a/ld/testsuite/ld-elf/orphan3.d b/ld/testsuite/ld-elf/orphan3.d
index fc236cc..493ba58 100644
--- a/ld/testsuite/ld-elf/orphan3.d
+++ b/ld/testsuite/ld-elf/orphan3.d
@@ -17,5 +17,5 @@
\[[ 0-9]+\] \.foo +NOBITS +[0-9a-f]+ +[0-9a-f]+ +0+20 +0+ +A +0 +0 +[0-9]+
#...
\[[ 0-9]+\] \.foo +PROGBITS +0+ +[0-9a-f]+ +0+20 +0+ +0 +0 +[0-9]+
- \[[ 0-9]+\] \.[^f].*
+ \[[ 0-9]+\] [._][^f].*
#pass
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c62x-c62x.d b/ld/testsuite/ld-tic6x/attr-arch-c62x-c62x.d
new file mode 100644
index 0000000..7d33966
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c62x-c62x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c62x c62x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c62x.s
+#source: attr-arch-c62x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C62x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c62x-c64x+.d b/ld/testsuite/ld-tic6x/attr-arch-c62x-c64x+.d
new file mode 100644
index 0000000..f097363
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c62x-c64x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c62x c64x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c62x.s
+#source: attr-arch-c64x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C64x\+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c62x-c64x.d b/ld/testsuite/ld-tic6x/attr-arch-c62x-c64x.d
new file mode 100644
index 0000000..6ebb94f
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c62x-c64x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c62x c64x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c62x.s
+#source: attr-arch-c64x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C64x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c62x-c674x.d b/ld/testsuite/ld-tic6x/attr-arch-c62x-c674x.d
new file mode 100644
index 0000000..5fa0d9e
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c62x-c674x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c62x c674x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c62x.s
+#source: attr-arch-c674x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c62x-c67x+.d b/ld/testsuite/ld-tic6x/attr-arch-c62x-c67x+.d
new file mode 100644
index 0000000..449d5dd
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c62x-c67x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c62x c67x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c62x.s
+#source: attr-arch-c67x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C67x\+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c62x-c67x.d b/ld/testsuite/ld-tic6x/attr-arch-c62x-c67x.d
new file mode 100644
index 0000000..47e295c
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c62x-c67x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c62x c67x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c62x.s
+#source: attr-arch-c67x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C67x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c62x.s b/ld/testsuite/ld-tic6x/attr-arch-c62x.s
new file mode 100644
index 0000000..e69fbf4
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c62x.s
@@ -0,0 +1 @@
+.arch c62x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x+-c62x.d b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c62x.d
new file mode 100644
index 0000000..d05dbb6
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c62x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x+ c62x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x+.s
+#source: attr-arch-c62x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C64x\+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x+-c64x+.d b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c64x+.d
new file mode 100644
index 0000000..29f00c0
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c64x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x+ c64x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x+.s
+#source: attr-arch-c64x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C64x\+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x+-c64x.d b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c64x.d
new file mode 100644
index 0000000..d007b23
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c64x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x+ c64x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x+.s
+#source: attr-arch-c64x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C64x\+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x+-c674x.d b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c674x.d
new file mode 100644
index 0000000..bef1c3f
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c674x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x+ c674x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x+.s
+#source: attr-arch-c674x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x+-c67x+.d b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c67x+.d
new file mode 100644
index 0000000..7bcfa8d
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c67x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x+ c67x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x+.s
+#source: attr-arch-c67x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x+-c67x.d b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c67x.d
new file mode 100644
index 0000000..68a3d2d
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x+-c67x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x+ c67x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x+.s
+#source: attr-arch-c67x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x+.s b/ld/testsuite/ld-tic6x/attr-arch-c64x+.s
new file mode 100644
index 0000000..2c2f210
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x+.s
@@ -0,0 +1 @@
+.arch c64x+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x-c62x.d b/ld/testsuite/ld-tic6x/attr-arch-c64x-c62x.d
new file mode 100644
index 0000000..47f87db
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x-c62x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x c62x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x.s
+#source: attr-arch-c62x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C64x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x-c64x+.d b/ld/testsuite/ld-tic6x/attr-arch-c64x-c64x+.d
new file mode 100644
index 0000000..648915c
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x-c64x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x c64x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x.s
+#source: attr-arch-c64x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C64x\+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x-c64x.d b/ld/testsuite/ld-tic6x/attr-arch-c64x-c64x.d
new file mode 100644
index 0000000..1f2e286
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x-c64x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x c64x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x.s
+#source: attr-arch-c64x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C64x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x-c674x.d b/ld/testsuite/ld-tic6x/attr-arch-c64x-c674x.d
new file mode 100644
index 0000000..d27fa57
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x-c674x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x c674x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x.s
+#source: attr-arch-c674x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x-c67x+.d b/ld/testsuite/ld-tic6x/attr-arch-c64x-c67x+.d
new file mode 100644
index 0000000..ee809a7
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x-c67x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x c67x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x.s
+#source: attr-arch-c67x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x-c67x.d b/ld/testsuite/ld-tic6x/attr-arch-c64x-c67x.d
new file mode 100644
index 0000000..9df8d0f
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x-c67x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c64x c67x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c64x.s
+#source: attr-arch-c67x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c64x.s b/ld/testsuite/ld-tic6x/attr-arch-c64x.s
new file mode 100644
index 0000000..438d0f8
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c64x.s
@@ -0,0 +1 @@
+.arch c64x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c674x-c62x.d b/ld/testsuite/ld-tic6x/attr-arch-c674x-c62x.d
new file mode 100644
index 0000000..53dc64d
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c674x-c62x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c674x c62x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c674x.s
+#source: attr-arch-c62x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c674x-c64x+.d b/ld/testsuite/ld-tic6x/attr-arch-c674x-c64x+.d
new file mode 100644
index 0000000..b7d9c64
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c674x-c64x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c674x c64x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c674x.s
+#source: attr-arch-c64x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c674x-c64x.d b/ld/testsuite/ld-tic6x/attr-arch-c674x-c64x.d
new file mode 100644
index 0000000..5a06c9a
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c674x-c64x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c674x c64x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c674x.s
+#source: attr-arch-c64x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c674x-c674x.d b/ld/testsuite/ld-tic6x/attr-arch-c674x-c674x.d
new file mode 100644
index 0000000..41b41e5
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c674x-c674x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c674x c674x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c674x.s
+#source: attr-arch-c674x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c674x-c67x+.d b/ld/testsuite/ld-tic6x/attr-arch-c674x-c67x+.d
new file mode 100644
index 0000000..77be063
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c674x-c67x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c674x c67x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c674x.s
+#source: attr-arch-c67x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c674x-c67x.d b/ld/testsuite/ld-tic6x/attr-arch-c674x-c67x.d
new file mode 100644
index 0000000..38acd9a
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c674x-c67x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c674x c67x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c674x.s
+#source: attr-arch-c67x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c674x.s b/ld/testsuite/ld-tic6x/attr-arch-c674x.s
new file mode 100644
index 0000000..41b3886
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c674x.s
@@ -0,0 +1 @@
+.arch c674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x+-c62x.d b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c62x.d
new file mode 100644
index 0000000..0d58d50
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c62x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x+ c62x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x+.s
+#source: attr-arch-c62x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C67x\+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x+-c64x+.d b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c64x+.d
new file mode 100644
index 0000000..65baf14
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c64x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x+ c64x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x+.s
+#source: attr-arch-c64x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x+-c64x.d b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c64x.d
new file mode 100644
index 0000000..e4c55d9
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c64x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x+ c64x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x+.s
+#source: attr-arch-c64x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x+-c674x.d b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c674x.d
new file mode 100644
index 0000000..41207d6
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c674x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x+ c674x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x+.s
+#source: attr-arch-c674x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x+-c67x+.d b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c67x+.d
new file mode 100644
index 0000000..27b717b
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c67x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x+ c67x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x+.s
+#source: attr-arch-c67x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C67x\+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x+-c67x.d b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c67x.d
new file mode 100644
index 0000000..73d2312
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x+-c67x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x+ c67x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x+.s
+#source: attr-arch-c67x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C67x\+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x+.s b/ld/testsuite/ld-tic6x/attr-arch-c67x+.s
new file mode 100644
index 0000000..f4c22de
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x+.s
@@ -0,0 +1 @@
+.arch c67x+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x-c62x.d b/ld/testsuite/ld-tic6x/attr-arch-c67x-c62x.d
new file mode 100644
index 0000000..e0dc26c
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x-c62x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x c62x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x.s
+#source: attr-arch-c62x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C67x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x-c64x+.d b/ld/testsuite/ld-tic6x/attr-arch-c67x-c64x+.d
new file mode 100644
index 0000000..82a3d12
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x-c64x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x c64x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x.s
+#source: attr-arch-c64x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x-c64x.d b/ld/testsuite/ld-tic6x/attr-arch-c67x-c64x.d
new file mode 100644
index 0000000..b7e7cba
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x-c64x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x c64x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x.s
+#source: attr-arch-c64x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x-c674x.d b/ld/testsuite/ld-tic6x/attr-arch-c67x-c674x.d
new file mode 100644
index 0000000..83e671c
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x-c674x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x c674x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x.s
+#source: attr-arch-c674x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C674x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x-c67x+.d b/ld/testsuite/ld-tic6x/attr-arch-c67x-c67x+.d
new file mode 100644
index 0000000..d51886c
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x-c67x+.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x c67x+
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x.s
+#source: attr-arch-c67x+.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C67x\+
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x-c67x.d b/ld/testsuite/ld-tic6x/attr-arch-c67x-c67x.d
new file mode 100644
index 0000000..aaa49fc
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x-c67x.d
@@ -0,0 +1,10 @@
+#name: C6X arch attribute merging, c67x c67x
+#as: -mlittle-endian
+#ld: -r -melf32_tic6x_le
+#source: attr-arch-c67x.s
+#source: attr-arch-c67x.s
+#readelf: -A
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_C6XABI_Tag_CPU_arch: C67x
diff --git a/ld/testsuite/ld-tic6x/attr-arch-c67x.s b/ld/testsuite/ld-tic6x/attr-arch-c67x.s
new file mode 100644
index 0000000..a7e5ba6
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/attr-arch-c67x.s
@@ -0,0 +1 @@
+.arch c67x