/* symbols.c -symbol table-
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
/* Local symbols are always either defined or used. */
ret->sy_used = 1;
+#ifdef TC_LOCAL_SYMFIELD_CONVERT
+ TC_LOCAL_SYMFIELD_CONVERT (locsym, ret);
+#endif
+
symbol_table_insert (ret);
local_symbol_mark_converted (locsym);
S_GET_OTHER (symbolP),
S_GET_DESC (symbolP));
#endif
- as_fatal (_("Symbol \"%s\" is already defined as \"%s\"/%s%ld."),
+ as_bad (_("Symbol \"%s\" is already defined as \"%s\"/%s%ld."),
sym_name,
segment_name (S_GET_SEGMENT (symbolP)),
od_buf,
if (!(frag_now == symbolP->sy_frag
&& S_GET_VALUE (symbolP) == frag_now_fix ()
&& S_GET_SEGMENT (symbolP) == now_seg))
- as_fatal (_("Symbol %s already defined."), sym_name);
- } /* if this symbol is not yet defined */
+ as_bad (_("Symbol %s already defined."), sym_name);
+ }
}
#ifdef BFD_ASSEMBLER
#endif /* OBJ_VMS */
symbol_table_insert (symbolP);
- } /* if we have seen this symbol before */
+ }
if (mri_common_symbol != NULL)
{
resolved = 0;
final_seg = S_GET_SEGMENT (symp);
+ /* Expressions aren't really symbols, so don't finalize their values
+ until relaxation is complete. */
+ if (final_seg == expr_section && finalize != 2)
+ finalize = 0;
if (symp->sy_resolving)
{
PTR value;
{
if (value != NULL)
- resolve_symbol_value (value, 1);
+ resolve_symbol_value (value, finalize_syms);
}
#endif
int label_number;
int instance_number;
char *type;
- const char *message_format = _("\"%d\" (instance number %d of a %s label)");
+ const char *message_format;
int index = 0;
-
+
#ifdef LOCAL_LABEL_PREFIX
if (s[index] == LOCAL_LABEL_PREFIX)
++index;
#endif
-
+
if (s[index] != 'L')
return s;
for (instance_number = 0, p++; isdigit ((unsigned char) *p); ++p)
instance_number = (10 * instance_number) + *p - '0';
+ message_format = _("\"%d\" (instance number %d of a %s label)");
symbol_decode = obstack_alloc (¬es, strlen (message_format) + 30);
sprintf (symbol_decode, message_format, label_number, instance_number, type);
#endif
if (!s->sy_resolved && s->sy_value.X_op != O_constant)
- resolve_symbol_value (s, 1);
+ {
+ valueT val = resolve_symbol_value (s, finalize_syms);
+ if (finalize_syms != 2 && S_GET_SEGMENT (s) == expr_section)
+ return val;
+ }
if (s->sy_value.X_op != O_constant)
{
static symbolS *recur;