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',
'\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
{
/* Command line processing. */
-const char *md_shortopts = "m:";
+const char md_shortopts[] = "m:";
#ifdef AARCH64_BI_ENDIAN
#define OPTION_EB (OPTION_MD_BASE + 0)
#endif
#endif
-struct option md_longopts[] = {
+const struct option md_longopts[] = {
#ifdef OPTION_EB
{"EB", no_argument, NULL, OPTION_EB},
#endif
{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
{
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 },
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
\f
#ifdef OBJ_EVAX
#define AXP_REG_R0 0
{ NULL, NULL, 0 }
};
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
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 },
{ 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. */
*/
-const char * md_shortopts = "m:k";
+const char md_shortopts[] = "m:k";
#ifdef ARM_BI_ENDIAN
#define OPTION_EB (OPTION_MD_BASE + 0)
#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},
{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
{
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;
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 },
{ 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. */
};
/* 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 },
{ NULL, no_argument, NULL, 0 },
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
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 },
{ 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
#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)
#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},
};
/* 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
#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
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:
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)
{"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;
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";
OPTION_NOGSTABSPACKING
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{"nowarnswap", no_argument, NULL, OPTION_NOWARNSWAP},
{"gstabspacking", no_argument, NULL, OPTION_GSTABSPACKING},
{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;
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";
#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;
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,
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)
const char FLT_CHARS[] = "dD";
\f
#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,
\f
#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)
#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 },
{ 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;
return NULL;
}
\f
-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. */
#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
{
\f
#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)
#endif
\f
#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)
#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)) \
{"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)
/* 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},
{"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
{
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)
/* Macro hash table, which we will add to. */
extern struct htab *macro_hash;
\f
-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,
/* 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 */
#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 },
{ 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)
/* 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 },
{ "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. */
/* 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;
OPTION_END_OF_ENUM,
};
-struct option md_longopts[] =
+const struct option md_longopts[] =
{
{ "mabi", required_argument, NULL, OPTION_ABI },
{ 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)
const char FLT_CHARS[] = "dD";
\f
#define M32C_SHORTOPTS ""
-const char * md_shortopts = M32C_SHORTOPTS;
+const char md_shortopts[] = M32C_SHORTOPTS;
/* assembler options */
#define OPTION_CPU_M16C (OPTION_MD_BASE)
#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 },
{ "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 */
\f
#define M32R_SHORTOPTS "O::K:"
-const char *md_shortopts = M32R_SHORTOPTS;
+const char md_shortopts[] = M32R_SHORTOPTS;
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},
{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)
\f
/* 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},
{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,
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)
{"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)
return ieee_md_atof (type, litP, sizeP, target_big_endian);
}
\f
-const char * md_shortopts = "";
+const char md_shortopts[] = "";
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},
{ 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)
#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},
{ "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
| (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;
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;
return NULL;
}
\f
-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},
{ 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;
static const struct mips_cpu_info *mips_cpu_info_from_arch (int);
\f
/* Command-line options. */
-const char *md_shortopts = "O::g::G:";
+const char md_shortopts[] = "O::g::G:";
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},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
\f
/* Information about either an Application Specific Extension or an
optional architecture feature that, for simplicity, we treat in the
} \
while (0)
-const char *md_shortopts = "x";
+const char md_shortopts[] = "x";
static int current_fb_label = -1;
static char *pending_label = NULL;
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)
{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;
struct mn10200_fixup fixups[MAX_INSN_FIXUPS];
static int fc;
\f
-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[] =
verify that certain registers do not match. */
int mn10300_reg_operands[MN10300_MAX_OPERANDS];
\f
-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)
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);
\f
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
int
md_parse_option (int c ATTRIBUTE_UNUSED, const char *arg ATTRIBUTE_UNUSED)
{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},
{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)
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 },
{ "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;
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},
{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
{
/* 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)
{"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. */
md_number_to_disp (ptr + 1, (valueT) offset, 4);
}
\f
-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)
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 */
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 },
{ 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. */
return ieee_md_atof (type, litP, sizeP, target_big_endian);
}
\f
-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)
{"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)
#endif /* OBJ_ELF */
\f
#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[] = {
static struct pru_opt_s pru_opt = { true, true };
-const char *md_shortopts = "r";
+const char md_shortopts[] = "r";
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,
{ 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
{
number_to_chars_littleendian (buf, val, n);
}
-const char *md_shortopts = "O::g::G:";
+const char md_shortopts[] = "O::g::G:";
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},
{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)
};
#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},
{"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)
};
#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},
{"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
{
\f
/* 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},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
\f
relax_typeS md_relax_table[] =
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. */
{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},
{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
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},
{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)
* 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)
{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)
str_hash_insert (op_hash, spu_opcodes[i].mnemonic, &spu_opcodes[i], 0);
}
\f
-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)
{"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
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
#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 },
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof (md_longopts);
-
+const size_t md_longopts_size = sizeof (md_longopts);
typedef enum
{
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 },
{ 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
const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "dDfF";
-const char *md_shortopts = "";
+const char md_shortopts[] = "";
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 },
{ "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). */
#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},
{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)
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)
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},
{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;
}
\f
#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)
}
/* 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
{
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";
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. */
{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 },
{ 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)
#define O_fptr_symbol (O_max + 1)
\f
#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,
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 },
{ 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)
const char FLT_CHARS[] = "RrDdFfSsHh\0";
/* For machine specific options. */
-const char * md_shortopts = ""; /* None yet. */
+const char md_shortopts[] = ""; /* None yet. */
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},
{ 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. */
return ieee_md_atof (type, litP, sizeP, true);
}
\f
-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)
@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
/* 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 *);