]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
opcodes/x86: make i386_mnem[] static
authorJan Beulich <jbeulich@suse.com>
Fri, 1 Aug 2025 07:18:31 +0000 (09:18 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 1 Aug 2025 07:18:31 +0000 (09:18 +0200)
With the tables no longer being part of libopcodes (but rather being
compiled directly into gas), this table doesn't need exposing anymore.
The declaration cannot be avoided, though, as the first use of the
array sits ahead of its definition (in i386-tbl.h).

opcodes/i386-gen.c
opcodes/i386-mnem.h
opcodes/i386-tbl.h

index a128a1bf012d09e85d140b4c77d4920c85f9f303..a9d229c236e44c0c24b46ce3039c8623e4f4de69 100644 (file)
@@ -2062,8 +2062,8 @@ process_i386_opcodes (FILE *table)
   process_copyright (fp);
 
   fprintf (table, "\n/* i386 mnemonics table.  */\n\n");
-  fprintf (table, "const char i386_mnemonics[] =\n");
-  fprintf (fp, "\nextern const char i386_mnemonics[];\n\n");
+  fprintf (table, "static const char i386_mnemonics[] =\n");
+  fprintf (fp, "\nstatic const char i386_mnemonics[];\n\n");
 
   str = NULL;
   for (l = strlen (opcode_array[offs = j = 0]->name); j < i; j++)
index 3e694159032989c376dde54c84343d962b03e022..001d10d5e117030df6c133fcd05664cf5a7dc72b 100644 (file)
@@ -18,7 +18,7 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
-extern const char i386_mnemonics[];
+static const char i386_mnemonics[];
 
 #define MN_ud0 0x1
 #define MN_prefetcht0 0x5
index ba453ad5fadf081730b8624d9c8400cea6621048..c8fbb93d414a57c4c5db05c5dd5d8ac558cdfb18 100644 (file)
@@ -48232,7 +48232,7 @@ static const i386_op_off_t i386_op_sets[] =
 
 /* i386 mnemonics table.  */
 
-const char i386_mnemonics[] =
+static const char i386_mnemonics[] =
   "\0""ud0"
   "\0""prefetcht0"
   "\0""prefetchit0"