aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorclaziss <claziss@synopsys.com>2018-08-06 16:41:32 +0300
committerClaudiu Zissulescu <claziss@gmail.com>2018-08-06 16:41:32 +0300
commit2fd43d7870803bf0713f76118cc0fcb89407e873 (patch)
treeb04c7684d0f97fdc9bbba80cc6dc29bad0e64fdb /ld
parentdb1e1b45b417dc3e7d37f401828afa18328d8508 (diff)
downloadgdb-2fd43d7870803bf0713f76118cc0fcb89407e873.zip
gdb-2fd43d7870803bf0713f76118cc0fcb89407e873.tar.gz
gdb-2fd43d7870803bf0713f76118cc0fcb89407e873.tar.bz2
[ARC] Update merging attributes.
Some attributes were ignored during merging. Fix that, and add some errors. bfd/ 2017-09-19 Claudiu Zissulescu <claziss@synopsys.com> * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes. ld/ 2017-09-19 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/ld-arc/attr-merge-6.d: New file. * testsuite/ld-arc/attr-merge-6a.s: Likewise. * testsuite/ld-arc/attr-merge-6b.s: Likewise. * testsuite/ld-arc/attr-merge-6bis.d: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/testsuite/ld-arc/attr-merge-6.d16
-rw-r--r--ld/testsuite/ld-arc/attr-merge-6a.s9
-rw-r--r--ld/testsuite/ld-arc/attr-merge-6b.s8
-rw-r--r--ld/testsuite/ld-arc/attr-merge-6bis.d16
5 files changed, 56 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 04f19ce..90efdd7 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,12 @@
2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
+ * testsuite/ld-arc/attr-merge-6.d: New file.
+ * testsuite/ld-arc/attr-merge-6a.s: Likewise.
+ * testsuite/ld-arc/attr-merge-6b.s: Likewise.
+ * testsuite/ld-arc/attr-merge-6bis.d: Likewise.
+
+2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
+
* testsuite/ld-arc/attr-merge-0.d: Update test.
* testsuite/ld-arc/attr-merge-1.d: Likewise.
* testsuite/ld-arc/attr-merge-2.d: Likewise.
diff --git a/ld/testsuite/ld-arc/attr-merge-6.d b/ld/testsuite/ld-arc/attr-merge-6.d
new file mode 100644
index 0000000..c90a503
--- /dev/null
+++ b/ld/testsuite/ld-arc/attr-merge-6.d
@@ -0,0 +1,16 @@
+# source: attr-merge-6a.s
+# source: attr-merge-6b.s
+# as:
+# ld: -r
+# readelf: -A
+
+Attribute Section: ARC
+File Attributes
+ Tag_ARC_PCS_config: Bare metal/newlib
+ Tag_ARC_CPU_base: ARCEM
+ Tag_ARC_CPU_variation: Core2
+ Tag_ARC_CPU_name: "arcem"
+ Tag_ARC_ABI_osver: v4
+ Tag_ARC_ABI_sda: MWDT
+ Tag_ARC_ISA_config: "CD"
+ Tag_ARC_ATR_version: 1
diff --git a/ld/testsuite/ld-arc/attr-merge-6a.s b/ld/testsuite/ld-arc/attr-merge-6a.s
new file mode 100644
index 0000000..cbd4fb4
--- /dev/null
+++ b/ld/testsuite/ld-arc/attr-merge-6a.s
@@ -0,0 +1,9 @@
+# MWDT like attribute structure
+ .cpu EM
+ .arc_attribute Tag_ARC_ATR_version, 1
+ .arc_attribute Tag_ARC_ABI_sda, 1
+ .arc_attribute Tag_ARC_ABI_enumsize, 0
+ .arc_attribute Tag_ARC_CPU_variation, 1
+ .arc_attribute Tag_ARC_ISA_mpy_option, 0
+ .arc_attribute Tag_ARC_ABI_osver, 0
+ .arc_attribute Tag_ARC_CPU_name, ""
diff --git a/ld/testsuite/ld-arc/attr-merge-6b.s b/ld/testsuite/ld-arc/attr-merge-6b.s
new file mode 100644
index 0000000..1e1392c
--- /dev/null
+++ b/ld/testsuite/ld-arc/attr-merge-6b.s
@@ -0,0 +1,8 @@
+#GCC like attribute structure
+ .cpu EM
+ .arc_attribute Tag_ARC_PCS_config, 2
+ .arc_attribute Tag_ARC_CPU_variation, 2
+ .arc_attribute Tag_ARC_CPU_name, "arcem"
+ .arc_attribute Tag_ARC_ABI_osver, 4
+ .arc_attribute Tag_ARC_ISA_config, "CD"
+ .arc_attribute Tag_ARC_ATR_version, 1
diff --git a/ld/testsuite/ld-arc/attr-merge-6bis.d b/ld/testsuite/ld-arc/attr-merge-6bis.d
new file mode 100644
index 0000000..795ac0d
--- /dev/null
+++ b/ld/testsuite/ld-arc/attr-merge-6bis.d
@@ -0,0 +1,16 @@
+# source: attr-merge-6b.s
+# source: attr-merge-6a.s
+# as:
+# ld: -r
+# readelf: -A
+
+Attribute Section: ARC
+File Attributes
+ Tag_ARC_PCS_config: Bare metal/newlib
+ Tag_ARC_CPU_base: ARCEM
+ Tag_ARC_CPU_variation: Core2
+ Tag_ARC_CPU_name: "arcem"
+ Tag_ARC_ABI_osver: v4
+ Tag_ARC_ABI_sda: MWDT
+ Tag_ARC_ISA_config: "CD"
+ Tag_ARC_ATR_version: 1