/* as.c - GAS main program.
- Copyright (C) 1987-2015 Free Software Foundation, Inc.
+ Copyright (C) 1987-2016 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
/* Enable verbose mode. */
int verbose = 0;
+#if defined OBJ_ELF || defined OBJ_MAYBE_ELF
+int flag_use_elf_stt_common = DEFAULT_GENERATE_ELF_STT_COMMON;
+#endif
+
/* Keep the output file. */
static int keep_it = 0;
select_emulation_mode (int argc, char **argv)
{
int i;
- char *p, *em = 0;
+ char *p;
+ const char *em = NULL;
for (i = 1; i < argc; i++)
if (!strncmp ("--em", argv[i], 4))
#ifdef USE_EMULATIONS
{
int i;
- char *def_em;
+ const char *def_em;
fprintf (stream, "\
--em=[");
--size-check=[error|warning]\n\
ELF .size directive check (default --size-check=error)\n"));
fprintf (stream, _("\
+ --elf-stt-common=[no|yes]\n\
+ generate ELF common symbols with STT_COMMON type\n"));
+ fprintf (stream, _("\
--sectname-subst enable section name substitution sequences\n"));
#endif
fprintf (stream, _("\
OPTION_EXECSTACK,
OPTION_NOEXECSTACK,
OPTION_SIZE_CHECK,
+ OPTION_ELF_STT_COMMON,
OPTION_SECTNAME_SUBST,
OPTION_ALTERNATE,
OPTION_AL,
,{"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}
case OPTION_VERSION:
/* This output is intended to follow the GNU standards document. */
printf (_("GNU assembler %s\n"), BFD_VERSION_STRING);
- printf (_("Copyright (C) 2015 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright (C) 2016 Free Software Foundation, Inc.\n"));
printf (_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License version 3 or later.\n\
as_fatal (_("Invalid --size-check= option: `%s'"), optarg);
break;
+ case OPTION_ELF_STT_COMMON:
+ if (strcasecmp (optarg, "no") == 0)
+ flag_use_elf_stt_common = 0;
+ else if (strcasecmp (optarg, "yes") == 0)
+ flag_use_elf_stt_common = 1;
+ else
+ as_fatal (_("Invalid --elf-stt-common= option: `%s'"),
+ optarg);
+ break;
+
case OPTION_SECTNAME_SUBST:
flag_sectname_subst = 1;
break;