- static const struct option std_longopts[] = {
-#define OPTION_HELP (OPTION_STD_BASE)
- {"help", no_argument, NULL, OPTION_HELP},
- {"keep-locals", no_argument, NULL, 'L'},
- {"mri", no_argument, NULL, 'M'},
-#define OPTION_NOCPP (OPTION_STD_BASE + 1)
- {"nocpp", no_argument, NULL, OPTION_NOCPP},
-#define OPTION_STATISTICS (OPTION_STD_BASE + 2)
- {"statistics", no_argument, NULL, OPTION_STATISTICS},
-#define OPTION_VERSION (OPTION_STD_BASE + 3)
- {"version", no_argument, NULL, OPTION_VERSION},
-#define OPTION_DUMPCONFIG (OPTION_STD_BASE + 4)
- {"dump-config", no_argument, NULL, OPTION_DUMPCONFIG},
-#define OPTION_VERBOSE (OPTION_STD_BASE + 5)
- {"verbose", no_argument, NULL, OPTION_VERBOSE},
-#define OPTION_EMULATION (OPTION_STD_BASE + 6)
- {"emulation", required_argument, NULL, OPTION_EMULATION},
-#define OPTION_DEFSYM (OPTION_STD_BASE + 7)
- {"defsym", required_argument, NULL, OPTION_DEFSYM},
-#define OPTION_INSTTBL (OPTION_STD_BASE + 8)
+ /* Codes used for the long options with no short synonyms. */
+ enum option_values
+ {
+ OPTION_HELP = OPTION_STD_BASE,
+ OPTION_NOCPP,
+ OPTION_STATISTICS,
+ OPTION_VERSION,
+ OPTION_DUMPCONFIG,
+ OPTION_VERBOSE,
+ OPTION_EMULATION,
+ OPTION_DEBUG_PREFIX_MAP,
+ OPTION_DEFSYM,
+ OPTION_LISTING_LHS_WIDTH,
+ OPTION_LISTING_LHS_WIDTH2,
+ OPTION_LISTING_RHS_WIDTH,
+ OPTION_LISTING_CONT_LINES,
+ OPTION_DEPFILE,
+ OPTION_GSTABS,
+ OPTION_GSTABS_PLUS,
+ OPTION_GDWARF2,
+ OPTION_GDWARF_SECTIONS,
+ OPTION_STRIP_LOCAL_ABSOLUTE,
+ OPTION_TRADITIONAL_FORMAT,
+ OPTION_WARN,
+ OPTION_TARGET_HELP,
+ OPTION_EXECSTACK,
+ OPTION_NOEXECSTACK,
+ OPTION_SIZE_CHECK,
+ OPTION_ELF_STT_COMMON,
+ OPTION_SECTNAME_SUBST,
+ OPTION_ALTERNATE,
+ OPTION_AL,
+ OPTION_HASH_TABLE_SIZE,
+ OPTION_REDUCE_MEMORY_OVERHEADS,
+ OPTION_WARN_FATAL,
+ OPTION_COMPRESS_DEBUG,
+ OPTION_NOCOMPRESS_DEBUG,
+ OPTION_NO_PAD_SECTIONS /* = STD_BASE + 40 */
+ /* When you add options here, check that they do
+ not collide with OPTION_MD_BASE. See as.h. */
+ };
+
+ static const struct option std_longopts[] =
+ {
+ /* Note: commas are placed at the start of the line rather than
+ the end of the preceding line so that it is simpler to
+ selectively add and remove lines from this list. */
+ {"alternate", no_argument, NULL, OPTION_ALTERNATE}
+ /* The entry for "a" is here to prevent getopt_long_only() from
+ considering that -a is an abbreviation for --alternate. This is
+ necessary because -a=<FILE> is a valid switch but getopt would
+ normally reject it since --alternate does not take an argument. */
+ ,{"a", optional_argument, NULL, 'a'}
+ /* Handle -al=<FILE>. */
+ ,{"al", optional_argument, NULL, OPTION_AL}
+ ,{"compress-debug-sections", optional_argument, NULL, OPTION_COMPRESS_DEBUG}
+ ,{"nocompress-debug-sections", no_argument, NULL, OPTION_NOCOMPRESS_DEBUG}
+ ,{"debug-prefix-map", required_argument, NULL, OPTION_DEBUG_PREFIX_MAP}
+ ,{"defsym", required_argument, NULL, OPTION_DEFSYM}
+ ,{"dump-config", no_argument, NULL, OPTION_DUMPCONFIG}
+ ,{"emulation", required_argument, NULL, OPTION_EMULATION}
+#if defined OBJ_ELF || defined OBJ_MAYBE_ELF
+ ,{"execstack", no_argument, NULL, OPTION_EXECSTACK}
+ ,{"noexecstack", no_argument, NULL, OPTION_NOEXECSTACK}
+ ,{"size-check", required_argument, NULL, OPTION_SIZE_CHECK}
+ ,{"elf-stt-common", required_argument, NULL, OPTION_ELF_STT_COMMON}
+ ,{"sectname-subst", no_argument, NULL, OPTION_SECTNAME_SUBST}
+#endif
+ ,{"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
+ ,{"gdwarf-2", no_argument, NULL, OPTION_GDWARF2}
+ /* GCC uses --gdwarf-2 but GAS uses to use --gdwarf2,
+ so we keep it here for backwards compatibility. */
+ ,{"gdwarf2", no_argument, NULL, OPTION_GDWARF2}
+ ,{"gdwarf-sections", no_argument, NULL, OPTION_GDWARF_SECTIONS}
+ ,{"gen-debug", no_argument, NULL, 'g'}
+ ,{"gstabs", no_argument, NULL, OPTION_GSTABS}
+ ,{"gstabs+", no_argument, NULL, OPTION_GSTABS_PLUS}
+ ,{"hash-size", required_argument, NULL, OPTION_HASH_TABLE_SIZE}
+ ,{"help", no_argument, NULL, OPTION_HELP}
+#ifdef HAVE_ITBL_CPU