[PATCH 3/3] RISC-V: Minor cleanup and typos when merging priv spec attributes.

Nelson Chu nelson.chu@sifive.com
Thu Aug 20 06:34:42 GMT 2020


	bfd/
	* elfnn-riscv.c (riscv_merge_attributes): Fix comment typos.

	ld/
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d: Remove
	the useless `warnings` keywords.
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-02.d: Likewise.
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-03.d: Likewise.
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-04.d: Likewise.
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-05.d: Likewise.
	* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-06.d: Likewise.
---
 bfd/elfnn-riscv.c                                          | 4 ++--
 ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d | 4 ++--
 ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-02.d | 4 ++--
 ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-03.d | 4 ++--
 ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-04.d | 4 ++--
 ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-05.d | 4 ++--
 ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-06.d | 4 ++--
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 513785e..5fc08fe 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -3046,7 +3046,7 @@ riscv_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
 		   out_attr[Tag_b].i,
 		   out_attr[Tag_c].i);
 
-		/* The priv spec v1.9.1 can be linked with other spec
+		/* The priv spec v1.9.1 can not be linked with other spec
 		   versions since the conflicts.  We plan to drop the
 		   v1.9.1 in a year or two, so this confict should be
 		   removed in the future.  */
@@ -3058,7 +3058,7 @@ riscv_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
 			 "linked with other spec versions."));
 		  }
 
-		/* Update the output priv attributes to the newest.  */
+		/* Update the output priv spec to the newest one.  */
 		if (in_priv_spec > out_priv_spec)
 		  {
 		    out_attr[Tag_a].i = in_attr[Tag_a].i;
diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d
index 0d5d6dc..007eaa3 100644
--- a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d
+++ b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d
@@ -2,8 +2,8 @@
 #source: attr-merge-priv-spec-c.s
 #as:
 #ld: -r
-#warning: .*warning: .*use privilege spec version 1.11.0 but the output use version 1.9.1.
-#warning: .*warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
+#warning: .*use privilege spec version 1.11.0 but the output use version 1.9.1.
+#warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
 #readelf: -A
 
 Attribute Section: riscv
diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-02.d b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-02.d
index f0f75b2..6707cee 100644
--- a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-02.d
+++ b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-02.d
@@ -2,8 +2,8 @@
 #source: attr-merge-priv-spec-a.s
 #as:
 #ld: -r
-#warning: .*warning: .*use privilege spec version 1.9.1 but the output use version 1.11.0.
-#warning: .*warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
+#warning: .*use privilege spec version 1.9.1 but the output use version 1.11.0.
+#warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
 #readelf: -A
 
 Attribute Section: riscv
diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-03.d b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-03.d
index af51552..7679fbf 100644
--- a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-03.d
+++ b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-03.d
@@ -3,8 +3,8 @@
 #source: attr-merge-priv-spec-c.s
 #as:
 #ld: -r
-#warning: .*warning: .*use privilege spec version 1.11.0 but the output use version 1.9.1.
-#warning: .*warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
+#warning: .*use privilege spec version 1.11.0 but the output use version 1.9.1.
+#warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
 #readelf: -A
 
 Attribute Section: riscv
diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-04.d b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-04.d
index 2328807..ee37ce1 100644
--- a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-04.d
+++ b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-04.d
@@ -3,8 +3,8 @@
 #source: attr-merge-priv-spec-c.s
 #as:
 #ld: -r
-#warning: .*warning: .*use privilege spec version 1.11.0 but the output use version 1.9.1.
-#warning: .*warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
+#warning: .*use privilege spec version 1.11.0 but the output use version 1.9.1.
+#warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
 #readelf: -A
 
 Attribute Section: riscv
diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-05.d b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-05.d
index cabaab6..c5fafad 100644
--- a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-05.d
+++ b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-05.d
@@ -3,8 +3,8 @@
 #source: attr-merge-priv-spec-a.s
 #as:
 #ld: -r
-#warning: .*warning: .*use privilege spec version 1.9.1 but the output use version 1.11.0.
-#warning: .*warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
+#warning: .*use privilege spec version 1.9.1 but the output use version 1.11.0.
+#warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
 #readelf: -A
 
 Attribute Section: riscv
diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-06.d b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-06.d
index e774748..7251be0 100644
--- a/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-06.d
+++ b/ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-06.d
@@ -3,8 +3,8 @@
 #source: attr-merge-priv-spec-a.s
 #as:
 #ld: -r
-#warning: .*warning: .*use privilege spec version 1.9.1 but the output use version 1.11.0.
-#warning: .*warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
+#warning: .*use privilege spec version 1.9.1 but the output use version 1.11.0.
+#warning: .*privilege spec version 1.9.1 can not be linked with other spec versions.
 #readelf: -A
 
 Attribute Section: riscv
-- 
2.7.4



More information about the Binutils mailing list