+2016-03-25 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
+
+ * as.c (parse_args): Adjust.
+ * as.h (flag_size_check): Rename to flag_allow_nonconst_size.
+ * config/obj-elf.c (elf_frob_symbol): Adjust.
+
2016-03-24 Jose E. Marchesi <jose.marchesi@oracle.com>
* config/tc-sparc.c (sparc_ip): Remove the V9 restriction on ASR
case OPTION_SIZE_CHECK:
if (strcasecmp (optarg, "error") == 0)
- flag_size_check = size_check_error;
+ flag_allow_nonconst_size = FALSE;
else if (strcasecmp (optarg, "warning") == 0)
- flag_size_check = size_check_warning;
+ flag_allow_nonconst_size = TRUE;
else
as_fatal (_("Invalid --size-check= option: `%s'"), optarg);
break;
#if defined OBJ_ELF || defined OBJ_MAYBE_ELF
/* If .size directive failure should be error or warning. */
-COMMON enum
- {
- size_check_error = 0,
- size_check_warning
- }
-flag_size_check;
+COMMON int flag_allow_nonconst_size;
/* If we should generate ELF common symbols with the STT_COMMON type. */
extern int flag_use_elf_stt_common;
S_SET_SIZE (symp, size->X_add_number);
else
{
- if (flag_size_check == size_check_error)
+ if (!flag_allow_nonconst_size)
as_bad (_(".size expression for %s "
"does not evaluate to a constant"), S_GET_NAME (symp));
else