public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [committed] readelf: MSP430: Fix incorrect usage of "msp430x" in function names
@ 2020-08-27 20:03 Jozef Lawrynowicz
  0 siblings, 0 replies; only message in thread
From: Jozef Lawrynowicz @ 2020-08-27 20:03 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]

The "X" in "MSP430X" indicates an extension to the original MSP430 ISA, but
these functions are generically used for all MSP430 ISAs, so the names should
not use the "X" suffix.

Successfully regtested the Binutils testsuite.

Committed as obvious.

[-- Attachment #2: 0001-readelf-MSP430-Fix-incorrect-usage-of-msp430x-in-fun.patch --]
[-- Type: text/plain, Size: 2814 bytes --]

From b0191216046cca6affd74b3bfebdb124ad5f428e Mon Sep 17 00:00:00 2001
From: Jozef Lawrynowicz <jozef.l@mittosystems.com>
Date: Thu, 27 Aug 2020 20:48:35 +0100
Subject: [PATCH] readelf: MSP430: Fix incorrect usage of "msp430x" in function
 names

The "X" in "MSP430X" indicates an extension to the original MSP430 ISA, but
these functions are generically used for all MSP430 ISAs, so the names should
not use the "X" suffix.

binutils/ChangeLog:

	* readelf.c (get_msp430x_section_type_name): Rename to ...
	(get_msp430_section_type_name): ... this.
	(get_section_type_name): Use get_msp430_section_type_name.
	(display_msp430x_attribute): Rename to ...
	(display_msp430_attribute): ... this.
	(process_arch_specific): Use display_msp430_attribute.
---
 binutils/ChangeLog | 9 +++++++++
 binutils/readelf.c | 8 ++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index e5e33867200..22d95e2b725 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,12 @@
+2020-08-27  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
+
+	* readelf.c (get_msp430x_section_type_name): Rename to ...
+	(get_msp430_section_type_name): ... this.
+	(get_section_type_name): Use get_msp430_section_type_name.
+	(display_msp430x_attribute): Rename to ...
+	(display_msp430_attribute): ... this.
+	(process_arch_specific): Use display_msp430_attribute.
+
 2020-08-27  John David Anglin  <danglin@gcc.gnu.org>
 
 	PR 26356
diff --git a/binutils/readelf.c b/binutils/readelf.c
index d4dcab841a6..3758ff14bfd 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4267,7 +4267,7 @@ get_tic6x_section_type_name (unsigned int sh_type)
 }
 
 static const char *
-get_msp430x_section_type_name (unsigned int sh_type)
+get_msp430_section_type_name (unsigned int sh_type)
 {
   switch (sh_type)
     {
@@ -4384,7 +4384,7 @@ get_section_type_name (Filedata * filedata, unsigned int sh_type)
 	      result = get_tic6x_section_type_name (sh_type);
 	      break;
 	    case EM_MSP430:
-	      result = get_msp430x_section_type_name (sh_type);
+	      result = get_msp430_section_type_name (sh_type);
 	      break;
 	    case EM_NFP:
 	      result = get_nfp_section_type_name (sh_type);
@@ -16174,7 +16174,7 @@ display_raw_attribute (unsigned char * p, unsigned char const * const end)
 }
 
 static unsigned char *
-display_msp430x_attribute (unsigned char * p,
+display_msp430_attribute (unsigned char * p,
 			   const unsigned char * const end)
 {
   unsigned int val;
@@ -20110,7 +20110,7 @@ process_arch_specific (Filedata * filedata)
 
     case EM_MSP430:
      return process_attributes (filedata, "mspabi", SHT_MSP430_ATTRIBUTES,
-				display_msp430x_attribute,
+				display_msp430_attribute,
 				display_msp430_gnu_attribute);
 
     case EM_RISCV:
-- 
2.28.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-27 20:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 20:03 [committed] readelf: MSP430: Fix incorrect usage of "msp430x" in function names Jozef Lawrynowicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).