* symbols.c (define_sym_at_dot): New function, extracted from..
(colon): ..here. Define error case cloned symbol.
This commit is contained in:
parent
f9272224cd
commit
a3371076af
2 changed files with 19 additions and 12 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2009-09-23 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* symbols.c (define_sym_at_dot): New function, extracted from..
|
||||||
|
(colon): ..here. Define error case cloned symbol.
|
||||||
|
|
||||||
2009-09-21 H.J. Lu <hongjiu.lu@intel.com>
|
2009-09-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* config/tc-i386.c: Remove white spaces.
|
* config/tc-i386.c: Remove white spaces.
|
||||||
|
|
|
@ -246,6 +246,17 @@ local_symbol_convert (struct local_symbol *locsym)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
define_sym_at_dot (symbolS *symbolP)
|
||||||
|
{
|
||||||
|
symbolP->sy_frag = frag_now;
|
||||||
|
#ifdef OBJ_VMS
|
||||||
|
S_SET_OTHER (symbolP, const_flag);
|
||||||
|
#endif
|
||||||
|
S_SET_VALUE (symbolP, (valueT) frag_now_fix ());
|
||||||
|
S_SET_SEGMENT (symbolP, now_seg);
|
||||||
|
}
|
||||||
|
|
||||||
/* We have just seen "<name>:".
|
/* We have just seen "<name>:".
|
||||||
Creates a struct symbol unless it already exists.
|
Creates a struct symbol unless it already exists.
|
||||||
|
|
||||||
|
@ -343,12 +354,7 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
|
||||||
}
|
}
|
||||||
if (S_GET_VALUE (symbolP) == 0)
|
if (S_GET_VALUE (symbolP) == 0)
|
||||||
{
|
{
|
||||||
symbolP->sy_frag = frag_now;
|
define_sym_at_dot (symbolP);
|
||||||
#ifdef OBJ_VMS
|
|
||||||
S_SET_OTHER (symbolP, const_flag);
|
|
||||||
#endif
|
|
||||||
S_SET_VALUE (symbolP, (valueT) frag_now_fix ());
|
|
||||||
S_SET_SEGMENT (symbolP, now_seg);
|
|
||||||
#ifdef N_UNDF
|
#ifdef N_UNDF
|
||||||
know (N_UNDF == 0);
|
know (N_UNDF == 0);
|
||||||
#endif /* if we have one, it better be zero. */
|
#endif /* if we have one, it better be zero. */
|
||||||
|
@ -393,12 +399,7 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
|
||||||
{
|
{
|
||||||
/* It is a .comm/.lcomm being converted to initialized
|
/* It is a .comm/.lcomm being converted to initialized
|
||||||
data. */
|
data. */
|
||||||
symbolP->sy_frag = frag_now;
|
define_sym_at_dot (symbolP);
|
||||||
#ifdef OBJ_VMS
|
|
||||||
S_SET_OTHER (symbolP, const_flag);
|
|
||||||
#endif
|
|
||||||
S_SET_VALUE (symbolP, (valueT) frag_now_fix ());
|
|
||||||
S_SET_SEGMENT (symbolP, now_seg); /* Keep N_EXT bit. */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -431,6 +432,7 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
|
||||||
{
|
{
|
||||||
as_bad (_("symbol `%s' is already defined"), sym_name);
|
as_bad (_("symbol `%s' is already defined"), sym_name);
|
||||||
symbolP = symbol_clone (symbolP, 0);
|
symbolP = symbol_clone (symbolP, 0);
|
||||||
|
define_sym_at_dot (symbolP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue