aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gas/as.c3
-rw-r--r--gas/config/tc-aarch64.c6
-rw-r--r--gas/config/tc-alpha.c8
-rw-r--r--gas/config/tc-arc.c6
-rw-r--r--gas/config/tc-arm.c6
-rw-r--r--gas/config/tc-avr.c6
-rw-r--r--gas/config/tc-bfin.c6
-rw-r--r--gas/config/tc-bpf.c6
-rw-r--r--gas/config/tc-cr16.c6
-rw-r--r--gas/config/tc-cris.c6
-rw-r--r--gas/config/tc-cris.h4
-rw-r--r--gas/config/tc-crx.c6
-rw-r--r--gas/config/tc-csky.c6
-rw-r--r--gas/config/tc-d10v.c6
-rw-r--r--gas/config/tc-d30v.c6
-rw-r--r--gas/config/tc-dlx.c6
-rw-r--r--gas/config/tc-epiphany.c6
-rw-r--r--gas/config/tc-fr30.c6
-rw-r--r--gas/config/tc-frv.c6
-rw-r--r--gas/config/tc-ft32.c6
-rw-r--r--gas/config/tc-h8300.c6
-rw-r--r--gas/config/tc-hppa.c12
-rw-r--r--gas/config/tc-i386.c8
-rw-r--r--gas/config/tc-ia64.c6
-rw-r--r--gas/config/tc-ip2k.c6
-rw-r--r--gas/config/tc-iq2000.c6
-rw-r--r--gas/config/tc-kvx.c6
-rw-r--r--gas/config/tc-lm32.c6
-rw-r--r--gas/config/tc-loongarch.c6
-rw-r--r--gas/config/tc-m32c.c6
-rw-r--r--gas/config/tc-m32r.c6
-rw-r--r--gas/config/tc-m68hc11.c6
-rw-r--r--gas/config/tc-m68k.c6
-rw-r--r--gas/config/tc-mcore.c6
-rw-r--r--gas/config/tc-mep.c6
-rw-r--r--gas/config/tc-metag.c6
-rw-r--r--gas/config/tc-microblaze.c6
-rw-r--r--gas/config/tc-mips.c6
-rw-r--r--gas/config/tc-mmix.c6
-rw-r--r--gas/config/tc-mn10200.c6
-rw-r--r--gas/config/tc-mn10300.c6
-rw-r--r--gas/config/tc-moxie.c6
-rw-r--r--gas/config/tc-msp430.c6
-rw-r--r--gas/config/tc-mt.c6
-rw-r--r--gas/config/tc-nds32.c6
-rw-r--r--gas/config/tc-nios2.c6
-rw-r--r--gas/config/tc-ns32k.c6
-rw-r--r--gas/config/tc-or1k.c6
-rw-r--r--gas/config/tc-pdp11.c6
-rw-r--r--gas/config/tc-pj.c6
-rw-r--r--gas/config/tc-ppc.c4
-rw-r--r--gas/config/tc-pru.c6
-rw-r--r--gas/config/tc-riscv.c6
-rw-r--r--gas/config/tc-rl78.c6
-rw-r--r--gas/config/tc-rx.c6
-rw-r--r--gas/config/tc-s12z.c6
-rw-r--r--gas/config/tc-s390.c6
-rw-r--r--gas/config/tc-score.c6
-rw-r--r--gas/config/tc-sh.c6
-rw-r--r--gas/config/tc-sparc.c6
-rw-r--r--gas/config/tc-spu.c6
-rw-r--r--gas/config/tc-tic30.c6
-rw-r--r--gas/config/tc-tic4x.c7
-rw-r--r--gas/config/tc-tic54x.c6
-rw-r--r--gas/config/tc-tic6x.c6
-rw-r--r--gas/config/tc-tilegx.c6
-rw-r--r--gas/config/tc-tilepro.c6
-rw-r--r--gas/config/tc-v850.c6
-rw-r--r--gas/config/tc-vax.c8
-rw-r--r--gas/config/tc-visium.c6
-rw-r--r--gas/config/tc-wasm32.c6
-rw-r--r--gas/config/tc-xgate.c6
-rw-r--r--gas/config/tc-xstormy16.c6
-rw-r--r--gas/config/tc-xtensa.c7
-rw-r--r--gas/config/tc-z80.c6
-rw-r--r--gas/config/tc-z8k.c6
-rw-r--r--gas/doc/internals.texi2
-rw-r--r--gas/tc.h4
78 files changed, 232 insertions, 237 deletions
diff --git a/gas/as.c b/gas/as.c
index 030da2e..f20b1e0 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -438,7 +438,6 @@ parse_args (int * pargc, char *** pargv)
the ordering of the two. We describe each non-option ARGV-element
as if it were the argument of an option with character code 1. */
char *shortopts;
- extern const char *md_shortopts;
static const char std_shortopts[] =
{
'-', 'J',
@@ -455,8 +454,6 @@ parse_args (int * pargc, char *** pargv)
'\0'
};
struct option *longopts;
- extern struct option md_longopts[];
- extern size_t md_longopts_size;
/* Codes used for the long options with no short synonyms. */
enum option_values
{
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index e94a0cf..4970ace 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -10467,7 +10467,7 @@ md_begin (void)
/* Command line processing. */
-const char *md_shortopts = "m:";
+const char md_shortopts[] = "m:";
#ifdef AARCH64_BI_ENDIAN
#define OPTION_EB (OPTION_MD_BASE + 0)
@@ -10480,7 +10480,7 @@ const char *md_shortopts = "m:";
#endif
#endif
-struct option md_longopts[] = {
+const struct option md_longopts[] = {
#ifdef OPTION_EB
{"EB", no_argument, NULL, OPTION_EB},
#endif
@@ -10490,7 +10490,7 @@ struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
struct aarch64_option_table
{
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c
index 0922f19..05b8ee2 100644
--- a/gas/config/tc-alpha.c
+++ b/gas/config/tc-alpha.c
@@ -243,12 +243,12 @@ const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "rRsSfFdDxXpP";
#ifdef OBJ_EVAX
-const char *md_shortopts = "Fm:g+1h:HG:";
+const char md_shortopts[] = "Fm:g+1h:HG:";
#else
-const char *md_shortopts = "Fm:gG:";
+const char md_shortopts[] = "Fm:gG:";
#endif
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_32ADDR (OPTION_MD_BASE)
{ "32addr", no_argument, NULL, OPTION_32ADDR },
@@ -269,7 +269,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
#ifdef OBJ_EVAX
#define AXP_REG_R0 0
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 5fd265a..6a85ca3 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -183,7 +183,7 @@ const pseudo_typeS md_pseudo_table[] =
{ NULL, NULL, 0 }
};
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
enum options
{
@@ -229,7 +229,7 @@ enum options
OPTION_RTSC
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "EB", no_argument, NULL, OPTION_EB },
{ "EL", no_argument, NULL, OPTION_EL },
@@ -292,7 +292,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Local data and data types. */
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 540ab48..a1bf33a 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -30341,7 +30341,7 @@ md_begin (void)
*/
-const char * md_shortopts = "m:k";
+const char md_shortopts[] = "m:k";
#ifdef ARM_BI_ENDIAN
#define OPTION_EB (OPTION_MD_BASE + 0)
@@ -30356,7 +30356,7 @@ const char * md_shortopts = "m:k";
#define OPTION_FIX_V4BX (OPTION_MD_BASE + 2)
#define OPTION_FDPIC (OPTION_MD_BASE + 3)
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#ifdef OPTION_EB
{"EB", no_argument, NULL, OPTION_EB},
@@ -30371,7 +30371,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
struct arm_option_table
{
diff --git a/gas/config/tc-avr.c b/gas/config/tc-avr.c
index b9fa9ed..9d80965 100644
--- a/gas/config/tc-avr.c
+++ b/gas/config/tc-avr.c
@@ -161,7 +161,7 @@ const char line_comment_chars[] = "#";
const char *avr_line_separator_chars = "$";
static const char *avr_line_separator_chars_no_dollar = "";
-const char *md_shortopts = "m:";
+const char md_shortopts[] = "m:";
struct mcu_type_s
{
const char *name;
@@ -571,7 +571,7 @@ enum options
OPTION_NO_DOLLAR_LINE_SEPARATOR,
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "mmcu", required_argument, NULL, OPTION_MMCU },
{ "mall-opcodes", no_argument, NULL, OPTION_ALL_OPCODES },
@@ -585,7 +585,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Display nicely formatted list of known MCU names. */
diff --git a/gas/config/tc-bfin.c b/gas/config/tc-bfin.c
index 001f90c..7493703 100644
--- a/gas/config/tc-bfin.c
+++ b/gas/config/tc-bfin.c
@@ -314,13 +314,13 @@ struct bfin_cpu bfin_cpus[] =
};
/* Define bfin-specific command-line options (there are none). */
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
#define OPTION_FDPIC (OPTION_MD_BASE)
#define OPTION_NOPIC (OPTION_MD_BASE + 1)
#define OPTION_MCPU (OPTION_MD_BASE + 2)
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "mcpu", required_argument, NULL, OPTION_MCPU },
{ "mfdpic", no_argument, NULL, OPTION_FDPIC },
@@ -329,7 +329,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 },
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
diff --git a/gas/config/tc-bpf.c b/gas/config/tc-bpf.c
index effb483..d0c18df 100644
--- a/gas/config/tc-bpf.c
+++ b/gas/config/tc-bpf.c
@@ -126,7 +126,7 @@ enum options
OPTION_NO_RELAX,
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "EL", no_argument, NULL, OPTION_LITTLE_ENDIAN },
{ "EB", no_argument, NULL, OPTION_BIG_ENDIAN },
@@ -137,9 +137,9 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 },
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
-const char * md_shortopts = "";
+const char md_shortopts[] = "";
/* BPF supports little-endian and big-endian variants. The following
global records what endianness to use. It can be configured using
diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c
index e91e41e..aa4a344 100644
--- a/gas/config/tc-cr16.c
+++ b/gas/config/tc-cr16.c
@@ -109,12 +109,12 @@ symbolS * GOT_symbol;
#endif
/* Target-specific multicharacter options, not const-declared at usage. */
-const char *md_shortopts = "";
-struct option md_longopts[] =
+const char md_shortopts[] = "";
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
static void
l_cons (int nbytes)
diff --git a/gas/config/tc-cris.c b/gas/config/tc-cris.c
index 86ec1f7..31184f3 100644
--- a/gas/config/tc-cris.c
+++ b/gas/config/tc-cris.c
@@ -414,7 +414,7 @@ const relax_typeS md_cris_relax_table[] =
#undef BDAP_WB
/* Target-specific multicharacter options, not const-declared. */
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_NO_US (OPTION_MD_BASE + 0)
{"no-underscore", no_argument, NULL, OPTION_NO_US},
@@ -432,8 +432,8 @@ struct option md_longopts[] =
};
/* Not const-declared. */
-size_t md_longopts_size = sizeof (md_longopts);
-const char *md_shortopts = "hHN";
+const size_t md_longopts_size = sizeof (md_longopts);
+const char md_shortopts[] = "hHN";
/* At first glance, this may seems wrong and should be 4 (ba + nop); but
since a short_jump must skip a *number* of long jumps, it must also be
diff --git a/gas/config/tc-cris.h b/gas/config/tc-cris.h
index 4dab3ad..8e39c12 100644
--- a/gas/config/tc-cris.h
+++ b/gas/config/tc-cris.h
@@ -44,10 +44,6 @@ extern unsigned int cris_mach (void);
#define TARGET_BYTES_BIG_ENDIAN 0
-extern const char *md_shortopts;
-extern struct option md_longopts[];
-extern size_t md_longopts_size;
-
extern const pseudo_typeS md_pseudo_table[];
/* This should be optional, since it is ignored as an escape (assumed to
diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c
index 3a47354..fb128aa 100644
--- a/gas/config/tc-crx.c
+++ b/gas/config/tc-crx.c
@@ -102,12 +102,12 @@ const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "f'";
/* Target-specific multicharacter options, not const-declared at usage. */
-const char *md_shortopts = "";
-struct option md_longopts[] =
+const char md_shortopts[] = "";
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* This table describes all the machine specific pseudo-ops
the assembler has to support. The fields are:
diff --git a/gas/config/tc-csky.c b/gas/config/tc-csky.c
index 0dc8bfd..74762f0 100644
--- a/gas/config/tc-csky.c
+++ b/gas/config/tc-csky.c
@@ -967,9 +967,9 @@ const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "rRsSfFdDxXeEpP";
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
-struct option md_longopts[] = {
+const struct option md_longopts[] = {
#define OPTION_MARCH (OPTION_MD_BASE + 0)
{"march", required_argument, NULL, OPTION_MARCH},
#define OPTION_MCPU (OPTION_MD_BASE + 1)
@@ -1023,7 +1023,7 @@ struct option md_longopts[] = {
{"mvdsp", no_argument, &do_opt_mvdsp, CSKY_ISA_VDSP},
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
static struct csky_insn_info csky_insn;
diff --git a/gas/config/tc-d10v.c b/gas/config/tc-d10v.c
index 6217654..2be6beb 100644
--- a/gas/config/tc-d10v.c
+++ b/gas/config/tc-d10v.c
@@ -28,7 +28,7 @@
const char comment_chars[] = ";";
const char line_comment_chars[] = "#";
const char line_separator_chars[] = "";
-const char *md_shortopts = "O";
+const char md_shortopts[] = "O";
const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "dD";
@@ -88,7 +88,7 @@ enum options
OPTION_NOGSTABSPACKING
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{"nowarnswap", no_argument, NULL, OPTION_NOWARNSWAP},
{"gstabspacking", no_argument, NULL, OPTION_GSTABSPACKING},
@@ -98,7 +98,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Opcode hash table. */
static htab_t d10v_hash;
diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c
index 0eab055..70ea71c 100644
--- a/gas/config/tc-d30v.c
+++ b/gas/config/tc-d30v.c
@@ -27,7 +27,7 @@
const char comment_chars[] = ";";
const char line_comment_chars[] = "#";
const char line_separator_chars[] = "";
-const char *md_shortopts = "OnNcC";
+const char md_shortopts[] = "OnNcC";
const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "dD";
@@ -107,12 +107,12 @@ static symbolS *d30v_last_label;
#define NOP_RIGHT ((long long) NOP)
#define NOP2 (FM00 | NOP_LEFT | NOP_RIGHT)
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Opcode hash table. */
static htab_t d30v_hash;
diff --git a/gas/config/tc-dlx.c b/gas/config/tc-dlx.c
index 6a7c520..cb5acf5 100644
--- a/gas/config/tc-dlx.c
+++ b/gas/config/tc-dlx.c
@@ -1047,14 +1047,14 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
fixP->fx_no_overflow = 1;
}
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c ATTRIBUTE_UNUSED,
diff --git a/gas/config/tc-epiphany.c b/gas/config/tc-epiphany.c
index fd6728c..8cd3646 100644
--- a/gas/config/tc-epiphany.c
+++ b/gas/config/tc-epiphany.c
@@ -103,16 +103,16 @@ enum options
OPTION_CPU_EPIPHANY16
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "mepiphany ", no_argument, NULL, OPTION_CPU_EPIPHANY },
{ "mepiphany16", no_argument, NULL, OPTION_CPU_EPIPHANY16 },
{ NULL, no_argument, NULL, 0 },
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
-const char * md_shortopts = "";
+const char md_shortopts[] = "";
int
md_parse_option (int c ATTRIBUTE_UNUSED, const char * arg ATTRIBUTE_UNUSED)
diff --git a/gas/config/tc-fr30.c b/gas/config/tc-fr30.c
index 1457f6b..b4dd307 100644
--- a/gas/config/tc-fr30.c
+++ b/gas/config/tc-fr30.c
@@ -55,13 +55,13 @@ const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "dD";
#define FR30_SHORTOPTS ""
-const char * md_shortopts = FR30_SHORTOPTS;
+const char md_shortopts[] = FR30_SHORTOPTS;
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c ATTRIBUTE_UNUSED,
diff --git a/gas/config/tc-frv.c b/gas/config/tc-frv.c
index 40bab49..d7c8c66 100644
--- a/gas/config/tc-frv.c
+++ b/gas/config/tc-frv.c
@@ -200,7 +200,7 @@ const pseudo_typeS md_pseudo_table[] =
#define FRV_SHORTOPTS "G:"
-const char * md_shortopts = FRV_SHORTOPTS;
+const char md_shortopts[] = FRV_SHORTOPTS;
#define OPTION_GPR_32 (OPTION_MD_BASE)
#define OPTION_GPR_64 (OPTION_MD_BASE + 1)
@@ -226,7 +226,7 @@ const char * md_shortopts = FRV_SHORTOPTS;
#define OPTION_FDPIC (OPTION_MD_BASE + 21)
#define OPTION_NOPIC (OPTION_MD_BASE + 22)
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "mgpr-32", no_argument, NULL, OPTION_GPR_32 },
{ "mgpr-64", no_argument, NULL, OPTION_GPR_64 },
@@ -255,7 +255,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 },
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* What value to give to bfd_set_gp_size. */
static int g_switch_value = 8;
diff --git a/gas/config/tc-ft32.c b/gas/config/tc-ft32.c
index 7ecfcea..74a6bfe 100644
--- a/gas/config/tc-ft32.c
+++ b/gas/config/tc-ft32.c
@@ -487,16 +487,16 @@ md_atof (int type, char *litP, int *sizeP)
return NULL;
}
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_NORELAX (OPTION_MD_BASE)
{"norelax", no_argument, NULL, OPTION_NORELAX},
{"no-relax", no_argument, NULL, OPTION_NORELAX},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* We have no target specific options yet, so these next
two functions are empty. */
diff --git a/gas/config/tc-h8300.c b/gas/config/tc-h8300.c
index aafceb0..08648ac 100644
--- a/gas/config/tc-h8300.c
+++ b/gas/config/tc-h8300.c
@@ -2076,15 +2076,15 @@ md_atof (int type, char *litP, int *sizeP)
#define OPTION_H_TICK_HEX (OPTION_MD_BASE)
#define OPTION_MACH (OPTION_MD_BASE+1)
-const char *md_shortopts = "";
-struct option md_longopts[] =
+const char md_shortopts[] = "";
+const struct option md_longopts[] =
{
{ "h-tick-hex", no_argument, NULL, OPTION_H_TICK_HEX },
{ "mach", required_argument, NULL, OPTION_MACH },
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
struct mach_func
{
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index f209407..bf8a247 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -1631,26 +1631,26 @@ md_estimate_size_before_relax (fragS *fragP, asection *segment ATTRIBUTE_UNUSED)
#ifdef OBJ_ELF
# ifdef WARN_COMMENTS
-const char *md_shortopts = "Vc";
+const char md_shortopts[] = "Vc";
# else
-const char *md_shortopts = "V";
+const char md_shortopts[] = "V";
# endif
#else
# ifdef WARN_COMMENTS
-const char *md_shortopts = "c";
+const char md_shortopts[] = "c";
# else
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
# endif
#endif
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#ifdef WARN_COMMENTS
{"warn-comment", no_argument, NULL, 'c'},
#endif
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index a695a15..9f68a2f 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -16756,9 +16756,9 @@ bool i386_record_operator (operatorT op,
#endif
#ifdef OBJ_ELF
-const char *md_shortopts = "kVQ:sqnO::";
+const char md_shortopts[] = "kVQ:sqnO::";
#else
-const char *md_shortopts = "qnO::";
+const char md_shortopts[] = "qnO::";
#endif
#define OPTION_32 (OPTION_MD_BASE + 0)
@@ -16798,7 +16798,7 @@ const char *md_shortopts = "qnO::";
#define OPTION_MUSE_UNALIGNED_VECTOR_MOVE (OPTION_MD_BASE + 34)
#define OPTION_MTLS_CHECK (OPTION_MD_BASE + 35)
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{"32", no_argument, NULL, OPTION_32},
#if (defined (OBJ_ELF) || defined (TE_PE) || defined (OBJ_MACH_O)) \
@@ -16848,7 +16848,7 @@ struct option md_longopts[] =
{"mtls-check", required_argument, NULL, OPTION_MTLS_CHECK},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg)
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 666c0ae..d8488bd 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -210,9 +210,9 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
/* ia64-specific option processing: */
-const char *md_shortopts = "m:N:x::";
+const char md_shortopts[] = "m:N:x::";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_MCONSTANT_GP (OPTION_MD_BASE + 1)
{"mconstant-gp", no_argument, NULL, OPTION_MCONSTANT_GP},
@@ -220,7 +220,7 @@ struct option md_longopts[] =
{"mauto-pic", no_argument, NULL, OPTION_MAUTO_PIC}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
static struct
{
diff --git a/gas/config/tc-ip2k.c b/gas/config/tc-ip2k.c
index 04a7580..babdf34 100644
--- a/gas/config/tc-ip2k.c
+++ b/gas/config/tc-ip2k.c
@@ -101,15 +101,15 @@ enum options
OPTION_CPU_IP2022EXT
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "mip2022", no_argument, NULL, OPTION_CPU_IP2022 },
{ "mip2022ext", no_argument, NULL, OPTION_CPU_IP2022EXT },
{ NULL, no_argument, NULL, 0 },
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
-const char * md_shortopts = "";
+const char md_shortopts[] = "";
int
md_parse_option (int c ATTRIBUTE_UNUSED, const char * arg ATTRIBUTE_UNUSED)
diff --git a/gas/config/tc-iq2000.c b/gas/config/tc-iq2000.c
index 1c2f4f5..2198ffd 100644
--- a/gas/config/tc-iq2000.c
+++ b/gas/config/tc-iq2000.c
@@ -108,12 +108,12 @@ static struct iq2000_hi_fixup * iq2000_hi_fixup_list;
/* Macro hash table, which we will add to. */
extern struct htab *macro_hash;
-const char *md_shortopts = "";
-struct option md_longopts[] =
+const char md_shortopts[] = "";
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c ATTRIBUTE_UNUSED,
diff --git a/gas/config/tc-kvx.c b/gas/config/tc-kvx.c
index e0860c0..2cdb843 100644
--- a/gas/config/tc-kvx.c
+++ b/gas/config/tc-kvx.c
@@ -233,7 +233,7 @@ struct label_fix
/* OPTIONS PROCESSING */
/*****************************************************/
-const char *md_shortopts = "hV"; /* catted to std short options */
+const char md_shortopts[] = "hV"; /* catted to std short options */
/* added to std long options */
@@ -254,7 +254,7 @@ const char *md_shortopts = "hV"; /* catted to std short options */
#define OPTION_MORE (OPTION_MD_BASE + 19)
#define OPTION_NO_MORE (OPTION_MD_BASE + 20)
-struct option md_longopts[] = {
+const struct option md_longopts[] = {
{ "march", required_argument, NULL, OPTION_MARCH },
{ "check-resources", no_argument, NULL, OPTION_CHECK_RESOURCES },
{ "no-check-resources", no_argument, NULL, OPTION_NO_CHECK_RESOURCES },
@@ -273,7 +273,7 @@ struct option md_longopts[] = {
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
diff --git a/gas/config/tc-lm32.c b/gas/config/tc-lm32.c
index 3d6fefe..17ab16d 100644
--- a/gas/config/tc-lm32.c
+++ b/gas/config/tc-lm32.c
@@ -85,9 +85,9 @@ const pseudo_typeS md_pseudo_table[] =
/* Target specific command line options. */
-const char * md_shortopts = "";
+const char md_shortopts[] = "";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_MULTIPLY_ENABLED (OPTION_MD_BASE + 1)
{ "mmultiply-enabled", no_argument, NULL, OPTION_MULTIPLY_ENABLED },
@@ -109,7 +109,7 @@ struct option md_longopts[] =
{ "mall-enabled", no_argument, NULL, OPTION_ALL_ENABLED },
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Display architecture specific options. */
diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c
index ab98a83..d5236aa 100644
--- a/gas/config/tc-loongarch.c
+++ b/gas/config/tc-loongarch.c
@@ -112,7 +112,7 @@ const char EXP_CHARS[] = "eE";
/* or 0d1.2345e12. */
const char FLT_CHARS[] = "rRsSfFdDxXpP";
-const char *md_shortopts = "O::g::G:";
+const char md_shortopts[] = "O::g::G:";
static const char default_arch[] = DEFAULT_ARCH;
@@ -154,7 +154,7 @@ enum options
OPTION_END_OF_ENUM,
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "mabi", required_argument, NULL, OPTION_ABI },
@@ -172,7 +172,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg)
diff --git a/gas/config/tc-m32c.c b/gas/config/tc-m32c.c
index c29f754..3459b24 100644
--- a/gas/config/tc-m32c.c
+++ b/gas/config/tc-m32c.c
@@ -61,7 +61,7 @@ const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "dD";
#define M32C_SHORTOPTS ""
-const char * md_shortopts = M32C_SHORTOPTS;
+const char md_shortopts[] = M32C_SHORTOPTS;
/* assembler options */
#define OPTION_CPU_M16C (OPTION_MD_BASE)
@@ -69,7 +69,7 @@ const char * md_shortopts = M32C_SHORTOPTS;
#define OPTION_LINKRELAX (OPTION_MD_BASE + 2)
#define OPTION_H_TICK_HEX (OPTION_MD_BASE + 3)
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "m16c", no_argument, NULL, OPTION_CPU_M16C },
{ "m32c", no_argument, NULL, OPTION_CPU_M32C },
@@ -77,7 +77,7 @@ struct option md_longopts[] =
{ "h-tick-hex", no_argument, NULL, OPTION_H_TICK_HEX },
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Default machine */
diff --git a/gas/config/tc-m32r.c b/gas/config/tc-m32r.c
index 2deb078..3b0c50b 100644
--- a/gas/config/tc-m32r.c
+++ b/gas/config/tc-m32r.c
@@ -189,7 +189,7 @@ allow_m32rx (int on)
#define M32R_SHORTOPTS "O::K:"
-const char *md_shortopts = M32R_SHORTOPTS;
+const char md_shortopts[] = M32R_SHORTOPTS;
enum md_option_enums
{
@@ -212,7 +212,7 @@ enum md_option_enums
OPTION_NO_WARN_UNMATCHED
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{"m32r", no_argument, NULL, OPTION_M32R},
{"m32rx", no_argument, NULL, OPTION_M32RX},
@@ -243,7 +243,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
static void
little (int on)
diff --git a/gas/config/tc-m68hc11.c b/gas/config/tc-m68hc11.c
index c7e54e4..71012b8 100644
--- a/gas/config/tc-m68hc11.c
+++ b/gas/config/tc-m68hc11.c
@@ -323,9 +323,9 @@ const pseudo_typeS md_pseudo_table[] =
/* Options and initialization. */
-const char *md_shortopts = "Sm:";
+const char md_shortopts[] = "Sm:";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_FORCE_LONG_BRANCH (OPTION_MD_BASE)
{"force-long-branches", no_argument, NULL, OPTION_FORCE_LONG_BRANCH},
@@ -364,7 +364,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Get the target cpu for the assembler. This is based on the configure
options and on the -m68hc11/-m68hc12 option. If no option is specified,
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index d04aa1e..9295976 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -7341,9 +7341,9 @@ m68k_set_extension (char const *name, int allow_m, int silent)
Invocation line includes a switch not recognized by the base assembler.
*/
-const char *md_shortopts = "lSA:m:kQ:V";
+const char md_shortopts[] = "lSA:m:kQ:V";
-struct option md_longopts[] = {
+const struct option md_longopts[] = {
#define OPTION_PIC (OPTION_MD_BASE)
{"pic", no_argument, NULL, OPTION_PIC},
#define OPTION_REGISTER_PREFIX_OPTIONAL (OPTION_MD_BASE + 1)
@@ -7363,7 +7363,7 @@ struct option md_longopts[] = {
{"pcrel", no_argument, NULL, OPTION_PCREL},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg)
diff --git a/gas/config/tc-mcore.c b/gas/config/tc-mcore.c
index 41237de..608db1a 100644
--- a/gas/config/tc-mcore.c
+++ b/gas/config/tc-mcore.c
@@ -1629,7 +1629,7 @@ md_atof (int type, char * litP, int * sizeP)
return ieee_md_atof (type, litP, sizeP, target_big_endian);
}
-const char * md_shortopts = "";
+const char md_shortopts[] = "";
enum options
{
@@ -1642,7 +1642,7 @@ enum options
OPTION_EL,
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "no-jsri2bsr", no_argument, NULL, OPTION_JSRI2BSR_OFF},
{ "jsri2bsr", no_argument, NULL, OPTION_JSRI2BSR_ON},
@@ -1654,7 +1654,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char * arg)
diff --git a/gas/config/tc-mep.c b/gas/config/tc-mep.c
index 2d01730..7119f5a 100644
--- a/gas/config/tc-mep.c
+++ b/gas/config/tc-mep.c
@@ -139,7 +139,7 @@ static struct mep_hi_fixup * mep_hi_fixup_list;
#define OPTION_NODSP (OPTION_MD_BASE + 32)
#define OPTION_LIBRARY (OPTION_MD_BASE + 33)
-struct option md_longopts[] = {
+const struct option md_longopts[] = {
{ "EB", no_argument, NULL, OPTION_EB},
{ "EL", no_argument, NULL, OPTION_EL},
{ "mconfig", required_argument, NULL, OPTION_CONFIG},
@@ -170,7 +170,7 @@ struct option md_longopts[] = {
{ "mno-dsp", no_argument, NULL, OPTION_NODSP},
{ "mlibrary", no_argument, NULL, OPTION_LIBRARY},
{ NULL, 0, NULL, 0 } };
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Options which default to on/off together. See the comment where
this is used for details. Note that CP and CP64 are not in this
@@ -189,7 +189,7 @@ size_t md_longopts_size = sizeof (md_longopts);
| (1 << CGEN_INSN_OPTIONAL_UCI_INSN) \
| (1 << CGEN_INSN_OPTIONAL_DSP_INSN) )
-const char * md_shortopts = "";
+const char md_shortopts[] = "";
static int optbits = 0;
static int optbitset = 0;
diff --git a/gas/config/tc-metag.c b/gas/config/tc-metag.c
index 66afa15..314f3fe 100644
--- a/gas/config/tc-metag.c
+++ b/gas/config/tc-metag.c
@@ -81,13 +81,13 @@ static unsigned int mcpu_opt = CoreMeta12;
static unsigned int mfpu_opt = 0;
static unsigned int mdsp_opt = 0;
-const char * md_shortopts = "m:";
+const char md_shortopts[] = "m:";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Parser hash tables. */
static htab_t mnemonic_htab;
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index c971d18..43e69d6 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -1901,9 +1901,9 @@ md_atof (int type, char * litP, int * sizeP)
return NULL;
}
-const char * md_shortopts = "";
+const char md_shortopts[] = "";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{"EB", no_argument, NULL, OPTION_EB},
{"EL", no_argument, NULL, OPTION_EL},
@@ -1912,7 +1912,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int md_short_jump_size;
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index f4125c1..b7ab162 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -1450,7 +1450,7 @@ static const struct mips_cpu_info *mips_cpu_info_from_isa (int);
static const struct mips_cpu_info *mips_cpu_info_from_arch (int);
/* Command-line options. */
-const char *md_shortopts = "O::g::G:";
+const char md_shortopts[] = "O::g::G:";
enum options
{
@@ -1585,7 +1585,7 @@ enum options
OPTION_END_OF_ENUM
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
/* Options which specify architecture. */
{"march", required_argument, NULL, OPTION_MARCH},
@@ -1738,7 +1738,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Information about either an Application Specific Extension or an
optional architecture feature that, for simplicity, we treat in the
diff --git a/gas/config/tc-mmix.c b/gas/config/tc-mmix.c
index 4d0f94e..f2a16e6 100644
--- a/gas/config/tc-mmix.c
+++ b/gas/config/tc-mmix.c
@@ -80,7 +80,7 @@ static void mmix_cons (int);
} \
while (0)
-const char *md_shortopts = "x";
+const char md_shortopts[] = "x";
static int current_fb_label = -1;
static char *pending_label = NULL;
@@ -189,7 +189,7 @@ static int doing_bspec = 0;
static const char *bspec_file;
static unsigned int bspec_line;
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_RELAX (OPTION_MD_BASE)
#define OPTION_NOEXPAND (OPTION_RELAX + 1)
@@ -215,7 +215,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
static htab_t mmix_opcode_hash;
diff --git a/gas/config/tc-mn10200.c b/gas/config/tc-mn10200.c
index 66db9e3..b191e26 100644
--- a/gas/config/tc-mn10200.c
+++ b/gas/config/tc-mn10200.c
@@ -85,14 +85,14 @@ struct mn10200_fixup
struct mn10200_fixup fixups[MAX_INSN_FIXUPS];
static int fc;
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* The target specific pseudo-ops which we support. */
const pseudo_typeS md_pseudo_table[] =
diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c
index be79b19..099d205 100644
--- a/gas/config/tc-mn10300.c
+++ b/gas/config/tc-mn10300.c
@@ -107,14 +107,14 @@ static int fc;
verify that certain registers do not match. */
int mn10300_reg_operands[MN10300_MAX_OPERANDS];
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
#define HAVE_AM33_2 (current_machine == AM33_2)
#define HAVE_AM33 (current_machine == AM33 || HAVE_AM33_2)
diff --git a/gas/config/tc-moxie.c b/gas/config/tc-moxie.c
index 266afff..d1923f0 100644
--- a/gas/config/tc-moxie.c
+++ b/gas/config/tc-moxie.c
@@ -606,16 +606,16 @@ enum options
OPTION_EL,
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "EB", no_argument, NULL, OPTION_EB},
{ "EL", no_argument, NULL, OPTION_EL},
{ NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
int
md_parse_option (int c ATTRIBUTE_UNUSED, const char *arg ATTRIBUTE_UNUSED)
diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c
index 19ea7fa..32c57ee 100644
--- a/gas/config/tc-msp430.c
+++ b/gas/config/tc-msp430.c
@@ -1742,9 +1742,9 @@ const pseudo_typeS md_pseudo_table[] =
{NULL, NULL, 0}
};
-const char *md_shortopts = "mm:,mP,mQ,ml,mN,mn,my,mY,mu,mU";
+const char md_shortopts[] = "mm:,mP,mQ,ml,mN,mn,my,mY,mu,mU";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{"msilicon-errata", required_argument, NULL, OPTION_SILICON_ERRATA},
{"msilicon-errata-warn", required_argument, NULL, OPTION_SILICON_ERRATA_WARN},
@@ -1764,7 +1764,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
void
md_show_usage (FILE * stream)
diff --git a/gas/config/tc-mt.c b/gas/config/tc-mt.c
index 42028bd..09cf397 100644
--- a/gas/config/tc-mt.c
+++ b/gas/config/tc-mt.c
@@ -68,7 +68,7 @@ const pseudo_typeS md_pseudo_table[] =
static int no_scheduling_restrictions = 0;
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_NO_SCHED_REST (OPTION_MD_BASE)
{ "nosched", no_argument, NULL, OPTION_NO_SCHED_REST },
@@ -76,9 +76,9 @@ struct option md_longopts[] =
{ "march", required_argument, NULL, OPTION_MARCH},
{ NULL, no_argument, NULL, 0 },
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
-const char * md_shortopts = "";
+const char md_shortopts[] = "";
/* Mach selected from command line. */
static int mt_mach = bfd_mach_ms1;
diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c
index 99254a1..b411824 100644
--- a/gas/config/tc-nds32.c
+++ b/gas/config/tc-nds32.c
@@ -2313,8 +2313,8 @@ enum options
OPTION_OPTIMIZE_SPACE
};
-const char *md_shortopts = "m:O:";
-struct option md_longopts[] =
+const char md_shortopts[] = "m:O:";
+const struct option md_longopts[] =
{
{"O1", no_argument, NULL, OPTION_OPTIMIZE},
{"Os", no_argument, NULL, OPTION_OPTIMIZE_SPACE},
@@ -2334,7 +2334,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
struct nds32_parse_option_table
{
diff --git a/gas/config/tc-nios2.c b/gas/config/tc-nios2.c
index 3d48b1e..bd96629 100644
--- a/gas/config/tc-nios2.c
+++ b/gas/config/tc-nios2.c
@@ -68,9 +68,9 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
/* Machine-dependent command-line options. */
-const char *md_shortopts = "r";
+const char md_shortopts[] = "r";
-struct option md_longopts[] = {
+const struct option md_longopts[] = {
#define OPTION_RELAX_ALL (OPTION_MD_BASE + 0)
{"relax-all", no_argument, NULL, OPTION_RELAX_ALL},
#define OPTION_NORELAX (OPTION_MD_BASE + 1)
@@ -85,7 +85,7 @@ struct option md_longopts[] = {
{"march", required_argument, NULL, OPTION_MARCH}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* The assembler supports three different relaxation modes, controlled by
command-line options. */
diff --git a/gas/config/tc-ns32k.c b/gas/config/tc-ns32k.c
index bdd3474..6e2ebd9 100644
--- a/gas/config/tc-ns32k.c
+++ b/gas/config/tc-ns32k.c
@@ -2109,16 +2109,16 @@ md_create_long_jump (char *ptr,
md_number_to_disp (ptr + 1, (valueT) offset, 4);
}
-const char *md_shortopts = "m:";
+const char md_shortopts[] = "m:";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_DISP_SIZE (OPTION_MD_BASE)
{"disp-size-default", required_argument , NULL, OPTION_DISP_SIZE},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg)
diff --git a/gas/config/tc-or1k.c b/gas/config/tc-or1k.c
index 14b09c9..c91ac11 100644
--- a/gas/config/tc-or1k.c
+++ b/gas/config/tc-or1k.c
@@ -56,13 +56,13 @@ const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "dD";
#define OR1K_SHORTOPTS "m:"
-const char * md_shortopts = OR1K_SHORTOPTS;
+const char md_shortopts[] = OR1K_SHORTOPTS;
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
unsigned long or1k_machine = 0; /* default */
diff --git a/gas/config/tc-pdp11.c b/gas/config/tc-pdp11.c
index 3054ad1..a0e06a3 100644
--- a/gas/config/tc-pdp11.c
+++ b/gas/config/tc-pdp11.c
@@ -1271,9 +1271,9 @@ set_machine_model (const char *arg)
return 0;
}
-const char *md_shortopts = "m:";
+const char md_shortopts[] = "m:";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_CPU 257
{ "cpu", required_argument, NULL, OPTION_CPU },
@@ -1284,7 +1284,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Invocation line includes a switch not recognized by the base assembler.
See if it's a processor-specific option. */
diff --git a/gas/config/tc-pj.c b/gas/config/tc-pj.c
index 3811637..bc49776 100644
--- a/gas/config/tc-pj.c
+++ b/gas/config/tc-pj.c
@@ -319,9 +319,9 @@ md_atof (int type, char *litP, int *sizeP)
return ieee_md_atof (type, litP, sizeP, target_big_endian);
}
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_LITTLE (OPTION_MD_BASE)
#define OPTION_BIG (OPTION_LITTLE + 1)
@@ -330,7 +330,7 @@ struct option md_longopts[] =
{"big", no_argument, NULL, OPTION_BIG},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 4100799..07e0f93 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -1098,9 +1098,9 @@ unsigned int ppc_apuinfo_num_alloc;
#endif /* OBJ_ELF */
#ifdef OBJ_ELF
-const char *const md_shortopts = "b:l:usm:K:VQ:";
+const char md_shortopts[] = "b:l:usm:K:VQ:";
#else
-const char *const md_shortopts = "um:";
+const char md_shortopts[] = "um:";
#endif
#define OPTION_NOPS (OPTION_MD_BASE + 0)
const struct option md_longopts[] = {
diff --git a/gas/config/tc-pru.c b/gas/config/tc-pru.c
index fb158fb..cfed102 100644
--- a/gas/config/tc-pru.c
+++ b/gas/config/tc-pru.c
@@ -75,7 +75,7 @@ struct pru_opt_s
static struct pru_opt_s pru_opt = { true, true };
-const char *md_shortopts = "r";
+const char md_shortopts[] = "r";
enum options
{
@@ -84,7 +84,7 @@ enum options
OPTION_NO_WARN_REGNAME_LABEL,
};
-struct option md_longopts[] = {
+const struct option md_longopts[] = {
{ "mlink-relax", no_argument, NULL, OPTION_LINK_RELAX },
{ "mno-link-relax", no_argument, NULL, OPTION_NO_LINK_RELAX },
{ "mno-warn-regname-label", no_argument, NULL,
@@ -92,7 +92,7 @@ struct option md_longopts[] = {
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
typedef struct pru_insn_reloc
{
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 4e804ff..e19142d 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -4305,7 +4305,7 @@ md_number_to_chars (char *buf, valueT val, int n)
number_to_chars_littleendian (buf, val, n);
}
-const char *md_shortopts = "O::g::G:";
+const char md_shortopts[] = "O::g::G:";
enum options
{
@@ -4326,7 +4326,7 @@ enum options
OPTION_END_OF_ENUM
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{"march", required_argument, NULL, OPTION_MARCH},
{"fPIC", no_argument, NULL, OPTION_PIC},
@@ -4346,7 +4346,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg)
diff --git a/gas/config/tc-rl78.c b/gas/config/tc-rl78.c
index 3be82f3..4b6564e 100644
--- a/gas/config/tc-rl78.c
+++ b/gas/config/tc-rl78.c
@@ -288,10 +288,10 @@ enum options
};
#define RL78_SHORTOPTS ""
-const char * md_shortopts = RL78_SHORTOPTS;
+const char md_shortopts[] = RL78_SHORTOPTS;
/* Assembler options. */
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{"relax", no_argument, NULL, OPTION_RELAX},
{"norelax", no_argument, NULL, OPTION_NORELAX},
@@ -303,7 +303,7 @@ struct option md_longopts[] =
{"m64bit-doubles", no_argument, NULL, OPTION_64BIT_DOUBLES},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED)
diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c
index 157f895..a881f2a 100644
--- a/gas/config/tc-rx.c
+++ b/gas/config/tc-rx.c
@@ -78,10 +78,10 @@ enum options
};
#define RX_SHORTOPTS ""
-const char * md_shortopts = RX_SHORTOPTS;
+const char md_shortopts[] = RX_SHORTOPTS;
/* Assembler options. */
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{"mbig-endian-data", no_argument, NULL, OPTION_BIG},
{"mlittle-endian-data", no_argument, NULL, OPTION_LITTLE},
@@ -105,7 +105,7 @@ struct option md_longopts[] =
{"mno-allow-string-insns", no_argument, NULL, OPTION_DISALLOW_STRING_INSNS},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
struct cpu_type
{
diff --git a/gas/config/tc-s12z.c b/gas/config/tc-s12z.c
index 0f8044d..c0920f1 100644
--- a/gas/config/tc-s12z.c
+++ b/gas/config/tc-s12z.c
@@ -84,9 +84,9 @@ s12z_strtol (const char *str, char ** endptr)
/* Options and initialization. */
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_REG_PREFIX (OPTION_MD_BASE)
{"mreg-prefix", required_argument, NULL, OPTION_REG_PREFIX},
@@ -95,7 +95,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
relax_typeS md_relax_table[] =
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 055b694..d8f31da 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -254,11 +254,11 @@ int md_short_jump_size = 4;
int md_long_jump_size = 4;
#endif
-const char *md_shortopts = "A:m:kVQ:";
-struct option md_longopts[] = {
+const char md_shortopts[] = "A:m:kVQ:";
+const struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Initialize the default opcode arch and word size from the default
architecture name if not specified by an option. */
diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c
index 707bd6f..2c24f42 100644
--- a/gas/config/tc-score.c
+++ b/gas/config/tc-score.c
@@ -216,8 +216,8 @@ const pseudo_typeS md_pseudo_table[] =
{0, 0, 0}
};
-const char *md_shortopts = "nO::g::G:";
-struct option md_longopts[] =
+const char md_shortopts[] = "nO::g::G:";
+const struct option md_longopts[] =
{
#ifdef OPTION_EB
{"EB" , no_argument, NULL, OPTION_EB},
@@ -239,7 +239,7 @@ struct option md_longopts[] =
{NULL , no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
#define s3_GP 28
#define s3_PIC_CALL_REG 29
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index 78c3fca..1509a56 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -2708,8 +2708,8 @@ enum options
OPTION_DUMMY /* Not used. This is just here to make it easy to add and subtract options from this enum. */
};
-const char *md_shortopts = "";
-struct option md_longopts[] =
+const char md_shortopts[] = "";
+const struct option md_longopts[] =
{
{"relax", no_argument, NULL, OPTION_RELAX},
{"big", no_argument, NULL, OPTION_BIG},
@@ -2732,7 +2732,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index bd489d5..5dedd42 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -401,8 +401,8 @@ sparc_target_format (void)
* error. For example, from sparclite to v9.
*/
-const char *md_shortopts = "A:K:VQ:sq";
-struct option md_longopts[] = {
+const char md_shortopts[] = "A:K:VQ:sq";
+const struct option md_longopts[] = {
#define OPTION_BUMP (OPTION_MD_BASE)
{"bump", no_argument, NULL, OPTION_BUMP},
#define OPTION_SPARC (OPTION_MD_BASE + 1)
@@ -442,7 +442,7 @@ struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg)
diff --git a/gas/config/tc-spu.c b/gas/config/tc-spu.c
index ea9d859..8793b57 100644
--- a/gas/config/tc-spu.c
+++ b/gas/config/tc-spu.c
@@ -120,8 +120,8 @@ md_begin (void)
str_hash_insert (op_hash, spu_opcodes[i].mnemonic, &spu_opcodes[i], 0);
}
-const char *md_shortopts = "";
-struct option md_longopts[] = {
+const char md_shortopts[] = "";
+const struct option md_longopts[] = {
#define OPTION_APUASM (OPTION_MD_BASE)
{"apuasm", no_argument, NULL, OPTION_APUASM},
#define OPTION_DD2 (OPTION_MD_BASE+1)
@@ -132,7 +132,7 @@ struct option md_longopts[] = {
{"mdd3.0", no_argument, NULL, OPTION_DD3},
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* When set (by -apuasm) our assembler emulates the behaviour of apuasm.
* e.g. don't add bias to float conversion and don't right shift
diff --git a/gas/config/tc-tic30.c b/gas/config/tc-tic30.c
index 8377f28..a76c126 100644
--- a/gas/config/tc-tic30.c
+++ b/gas/config/tc-tic30.c
@@ -40,13 +40,13 @@ const char comment_chars[] = ";";
const char line_comment_chars[] = "*";
const char line_separator_chars[] = "";
-const char *md_shortopts = "";
-struct option md_longopts[] =
+const char md_shortopts[] = "";
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* Chars that mean this number is a floating point constant.
As in 0f12.456
diff --git a/gas/config/tc-tic4x.c b/gas/config/tc-tic4x.c
index 6c86b21..3b4e411 100644
--- a/gas/config/tc-tic4x.c
+++ b/gas/config/tc-tic4x.c
@@ -77,8 +77,8 @@ static unsigned long tic4x_oplevel = 0; /* Opcode level */
#define OPTION_ENHANCED (OPTION_MD_BASE + 7)
#define OPTION_REV (OPTION_MD_BASE + 8)
-const char *md_shortopts = "bm:prs";
-struct option md_longopts[] =
+const char md_shortopts[] = "bm:prs";
+const struct option md_longopts[] =
{
{ "mcpu", required_argument, NULL, OPTION_CPU },
{ "mdsp", required_argument, NULL, OPTION_CPU },
@@ -93,8 +93,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
-
+const size_t md_longopts_size = sizeof (md_longopts);
typedef enum
{
diff --git a/gas/config/tc-tic54x.c b/gas/config/tc-tic54x.c
index 5a07220..b60b1a7 100644
--- a/gas/config/tc-tic54x.c
+++ b/gas/config/tc-tic54x.c
@@ -138,14 +138,14 @@ const char FLT_CHARS[] = "fF";
nums. */
const char EXP_CHARS[] = "eE";
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
#define OPTION_ADDRESS_MODE (OPTION_MD_BASE)
#define OPTION_CPU_VERSION (OPTION_ADDRESS_MODE + 1)
#define OPTION_COFF_VERSION (OPTION_CPU_VERSION + 1)
#define OPTION_STDERR_TO_FILE (OPTION_COFF_VERSION + 1)
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "mfar-mode", no_argument, NULL, OPTION_ADDRESS_MODE },
{ "mf", no_argument, NULL, OPTION_ADDRESS_MODE },
@@ -155,7 +155,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0},
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
static int assembly_begun = 0;
/* Addressing mode is not entirely implemented; the latest rev of the Other
diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c
index 302043a..8a2d4e3 100644
--- a/gas/config/tc-tic6x.c
+++ b/gas/config/tc-tic6x.c
@@ -48,7 +48,7 @@ const char line_separator_chars[] = "@";
const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "dDfF";
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
enum
{
@@ -63,7 +63,7 @@ enum
OPTION_MGENERATE_REL
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "march", required_argument, NULL, OPTION_MARCH },
{ "mbig-endian", no_argument, NULL, OPTION_MBIG_ENDIAN },
@@ -76,7 +76,7 @@ struct option md_longopts[] =
{ "mgenerate-rel", no_argument, NULL, OPTION_MGENERATE_REL },
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* The instructions enabled based only on the selected architecture
(all instructions, if no architecture specified). */
diff --git a/gas/config/tc-tilegx.c b/gas/config/tc-tilegx.c
index 4e81af7..1c249e0 100644
--- a/gas/config/tc-tilegx.c
+++ b/gas/config/tc-tilegx.c
@@ -84,9 +84,9 @@ tilegx_target_format (void)
#define OPTION_EB (OPTION_MD_BASE + 2)
#define OPTION_EL (OPTION_MD_BASE + 3)
-const char *md_shortopts = "VQ:";
+const char md_shortopts[] = "VQ:";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{"32", no_argument, NULL, OPTION_32},
{"64", no_argument, NULL, OPTION_64},
@@ -95,7 +95,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
diff --git a/gas/config/tc-tilepro.c b/gas/config/tc-tilepro.c
index dced4e2..a0ea505 100644
--- a/gas/config/tc-tilepro.c
+++ b/gas/config/tc-tilepro.c
@@ -61,14 +61,14 @@ const char EXP_CHARS[] = "eE";
as in 0d1.0. */
const char FLT_CHARS[] = "rRsSfFdDxXpP";
-const char *md_shortopts = "VQ:";
+const char md_shortopts[] = "VQ:";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index cb518a7..e66a74e 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -1515,9 +1515,9 @@ parse_register_list (unsigned long *insn,
return NULL;
}
-const char *md_shortopts = "m:";
+const char md_shortopts[] = "m:";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_DISP_SIZE_DEFAULT_22 (OPTION_MD_BASE)
{"disp-size-default-22", no_argument, NULL, OPTION_DISP_SIZE_DEFAULT_22},
@@ -1526,7 +1526,7 @@ struct option md_longopts[] =
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
static bool v850_data_8 = false;
diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c
index cab1264..9125611 100644
--- a/gas/config/tc-vax.c
+++ b/gas/config/tc-vax.c
@@ -2190,18 +2190,18 @@ md_create_long_jump (char *ptr,
}
#ifdef OBJ_ELF
-const char *md_shortopts = "d:STt:VkQ:";
+const char md_shortopts[] = "d:STt:VkQ:";
#else
-const char *md_shortopts = "d:STt:V";
+const char md_shortopts[] = "d:STt:V";
#endif
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#ifdef OBJ_ELF
{ "pic", no_argument, NULL, 'k' },
#endif
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg)
diff --git a/gas/config/tc-visium.c b/gas/config/tc-visium.c
index fcb128a..6288021 100644
--- a/gas/config/tc-visium.c
+++ b/gas/config/tc-visium.c
@@ -218,14 +218,14 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
}
/* The parse options. */
-const char *md_shortopts = "m:";
+const char md_shortopts[] = "m:";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
struct visium_option_table
{
diff --git a/gas/config/tc-wasm32.c b/gas/config/tc-wasm32.c
index 71f58bc..b0af6f8 100644
--- a/gas/config/tc-wasm32.c
+++ b/gas/config/tc-wasm32.c
@@ -78,7 +78,7 @@ const char comment_chars[] = ";#";
const char line_comment_chars[] = ";#";
const char line_separator_chars[] = "";
-const char *md_shortopts = "m:";
+const char md_shortopts[] = "m:";
const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "dD";
@@ -94,12 +94,12 @@ const pseudo_typeS md_pseudo_table[] =
static htab_t wasm32_hash;
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
/* No relaxation/no machine-dependent frags. */
diff --git a/gas/config/tc-xgate.c b/gas/config/tc-xgate.c
index d55e7a9..6a345c5 100644
--- a/gas/config/tc-xgate.c
+++ b/gas/config/tc-xgate.c
@@ -163,9 +163,9 @@ const pseudo_typeS md_pseudo_table[] =
{0, 0, 0}
};
-const char *md_shortopts = "m:";
+const char md_shortopts[] = "m:";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_PRINT_INSN_SYNTAX (OPTION_MD_BASE + 0)
{ "print-insn-syntax", no_argument, NULL, OPTION_PRINT_INSN_SYNTAX },
@@ -191,7 +191,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
const char *
md_atof (int type, char *litP, int *sizeP)
diff --git a/gas/config/tc-xstormy16.c b/gas/config/tc-xstormy16.c
index eb07079..a033694 100644
--- a/gas/config/tc-xstormy16.c
+++ b/gas/config/tc-xstormy16.c
@@ -56,13 +56,13 @@ const char FLT_CHARS[] = "dD";
#define O_fptr_symbol (O_max + 1)
#define XSTORMY16_SHORTOPTS ""
-const char * md_shortopts = XSTORMY16_SHORTOPTS;
+const char md_shortopts[] = XSTORMY16_SHORTOPTS;
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c ATTRIBUTE_UNUSED,
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index deecbb1..8206b1a 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -735,9 +735,9 @@ enum
option_abi_call0,
};
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "density", no_argument, NULL, option_density },
{ "no-density", no_argument, NULL, option_no_density },
@@ -820,8 +820,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof md_longopts;
-
+const size_t md_longopts_size = sizeof md_longopts;
int
md_parse_option (int c, const char *arg)
diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c
index eaabb26..86f8e6b 100644
--- a/gas/config/tc-z80.c
+++ b/gas/config/tc-z80.c
@@ -34,7 +34,7 @@ const char EXP_CHARS[] = "eE\0";
const char FLT_CHARS[] = "RrDdFfSsHh\0";
/* For machine specific options. */
-const char * md_shortopts = ""; /* None yet. */
+const char md_shortopts[] = ""; /* None yet. */
enum options
{
@@ -80,7 +80,7 @@ enum options
#define INS_UNDOC (INS_IDX_HALF | INS_IN_F_C)
#define INS_UNPORT (INS_OUT_C_0 | INS_SLI | INS_ROT_II_LD)
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "march", required_argument, NULL, OPTION_MARCH},
{ "z80", no_argument, NULL, OPTION_MACH_Z80},
@@ -115,7 +115,7 @@ struct option md_longopts[] =
{ NULL, no_argument, NULL, 0 }
} ;
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
extern int coff_flags;
/* Instruction classes that silently assembled. */
diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c
index b23f152..b96b5cf 100644
--- a/gas/config/tc-z8k.c
+++ b/gas/config/tc-z8k.c
@@ -1309,16 +1309,16 @@ md_atof (int type, char *litP, int *sizeP)
return ieee_md_atof (type, litP, sizeP, true);
}
-const char *md_shortopts = "z:";
+const char md_shortopts[] = "z:";
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
#define OPTION_RELAX (OPTION_MD_BASE)
{"linkrelax", no_argument, NULL, OPTION_RELAX},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (int c, const char *arg)
diff --git a/gas/doc/internals.texi b/gas/doc/internals.texi
index e59d676..18fca0e 100644
--- a/gas/doc/internals.texi
+++ b/gas/doc/internals.texi
@@ -814,7 +814,7 @@ zero if the target is little endian.
@cindex md_show_usage
@cindex md_after_parse_args
GAS uses these variables and functions during option processing.
-@code{md_shortopts} is a @code{const char *} which GAS adds to the machine
+@code{md_shortopts} is a @code{const char []} which GAS adds to the machine
independent string passed to @code{getopt}. @code{md_longopts} is a
@code{struct option []} which GAS adds to the machine independent long options
passed to @code{getopt}; you may use @code{OPTION_MD_BASE}, defined in
diff --git a/gas/tc.h b/gas/tc.h
index ec47d45..4e387d1 100644
--- a/gas/tc.h
+++ b/gas/tc.h
@@ -22,6 +22,10 @@
/* In theory (mine, at least!) the machine dependent part of the assembler
should only have to include one file. This one. -- JF */
+extern const char md_shortopts[];
+extern const struct option md_longopts[];
+extern const size_t md_longopts_size;
+
extern const pseudo_typeS md_pseudo_table[];
const char * md_atof (int, char *, int *);