[binutils-gdb] Assorted tidies

Alan Modra amodra@sourceware.org
Fri Dec 18 00:04:50 GMT 2020


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3fafa2e26ed651e3d3a50193b5bbf8f55779c7aa

commit 3fafa2e26ed651e3d3a50193b5bbf8f55779c7aa
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Dec 18 09:38:00 2020 +1030

    Assorted tidies
    
    bfd/
            * elf32-microblaze.c (dbg): Delete unused variable.
            * elf32-nds32.c (relax_group_section_id_list): Make static.
            * som.c (reloc_queue): Make static.
            * xtensa-isa.c (xtisa_errno, xtisa_error_msg): Make static.
    include/
            * xtensa-isa-internal.h (xtisa_errno, xtisa_error_msg): Delete.

Diff:
---
 bfd/ChangeLog                 | 7 +++++++
 bfd/elf32-microblaze.c        | 2 --
 bfd/elf32-nds32.c             | 2 +-
 bfd/som.c                     | 2 +-
 bfd/xtensa-isa.c              | 4 ++--
 include/ChangeLog             | 4 ++++
 include/xtensa-isa-internal.h | 3 ---
 7 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6b09a443546..cb72b1380c1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2020-12-18  Alan Modra  <amodra@gmail.com>
+
+	* elf32-microblaze.c (dbg): Delete unused variable.
+	* elf32-nds32.c (relax_group_section_id_list): Make static.
+	* som.c (reloc_queue): Make static.
+	* xtensa-isa.c (xtisa_errno, xtisa_error_msg): Make static.
+
 2020-12-18  Alan Modra  <amodra@gmail.com>
 
 	* archive.c (_bfd_ar_spacepad, _bfd_ar_sizepad): Use auto buf.
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index 1b5c2efcd6e..f49fc8d4991 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -20,8 +20,6 @@
    Boston, MA 02110-1301, USA.  */
 
 
-int dbg = 0;
-
 #include "sysdep.h"
 #include "bfd.h"
 #include "bfdlink.h"
diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c
index 85bbd091c83..15c63e916e3 100644
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
@@ -13336,7 +13336,7 @@ elf32_nds32_check_relax_group (bfd *abfd, asection *asec)
 }
 
 /* Reorder RELAX_GROUP ID when command line option '-r' is applied.  */
-struct section_id_list_t *relax_group_section_id_list = NULL;
+static struct section_id_list_t *relax_group_section_id_list = NULL;
 
 struct section_id_list_t *
 elf32_nds32_lookup_section_id (int id, struct section_id_list_t **lst_ptr)
diff --git a/bfd/som.c b/bfd/som.c
index d3865f0ef6e..7d6fc7f2717 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -114,7 +114,7 @@ static unsigned int som_slurp_symbol_table (bfd *);
 
    Note one side effect of using a R_PREV_FIXUP is the relocation that
    is being repeated moves to the front of the queue.  */
-struct reloc_queue
+static struct reloc_queue
 {
   unsigned char *reloc;
   unsigned int size;
diff --git a/bfd/xtensa-isa.c b/bfd/xtensa-isa.c
index bbd91249024..72aae0b9cc8 100644
--- a/bfd/xtensa-isa.c
+++ b/bfd/xtensa-isa.c
@@ -24,8 +24,8 @@
 #include "xtensa-isa.h"
 #include "xtensa-isa-internal.h"
 
-xtensa_isa_status xtisa_errno;
-char xtisa_error_msg[1024];
+static xtensa_isa_status xtisa_errno;
+static char xtisa_error_msg[1024];
 
 
 xtensa_isa_status
diff --git a/include/ChangeLog b/include/ChangeLog
index 24f16888a45..933e7dab45d 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2020-12-18  Alan Modra  <amodra@gmail.com>
+
+	* xtensa-isa-internal.h (xtisa_errno, xtisa_error_msg): Delete.
+
 2020-12-18  Alan Modra  <amodra@gmail.com>
 
 	* opcode/arc-attrs.h (CONFLICT_LIST): Make const.
diff --git a/include/xtensa-isa-internal.h b/include/xtensa-isa-internal.h
index cf1e8a3cfa1..e7edab4f9f6 100644
--- a/include/xtensa-isa-internal.h
+++ b/include/xtensa-isa-internal.h
@@ -228,7 +228,4 @@ typedef struct xtensa_isa_internal_struct
 
 extern int xtensa_isa_name_compare (const void *, const void *);
 
-extern xtensa_isa_status xtisa_errno;
-extern char xtisa_error_msg[];
-
 #endif /* !XTENSA_ISA_INTERNAL_H */


More information about the Binutils-cvs mailing list