*/
if (LOCAL_SYMBOL_CHECK (symbolP))
{
+#ifdef BFD_ASSEMBLER
struct local_symbol *locsym = (struct local_symbol *) symbolP;
if (locsym->lsy_section != undefined_section
locsym->lsy_section = now_seg;
local_symbol_set_frag (locsym, frag_now);
locsym->lsy_offset = frag_now_fix ();
+#endif
}
else if (!S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP))
{
CONST char *name;
int strip_underscore;
{
- struct local_symbol *locsym;
-
if (strip_underscore && *name == '_')
name++;
*copy = '\0';
}
- locsym = (struct local_symbol *) hash_find (local_hash, name);
- if (locsym != NULL)
- return (symbolS *) locsym;
+#ifdef BFD_ASSEMBLER
+ {
+ struct local_symbol *locsym;
+
+ locsym = (struct local_symbol *) hash_find (local_hash, name);
+ if (locsym != NULL)
+ return (symbolS *) locsym;
+ }
+#endif
return ((symbolS *) hash_find (sy_hash, name));
}
symbolS *addme;
symbolS *target;
symbolS **rootPP;
- symbolS **lastPP;
+ symbolS **lastPP ATTRIBUTE_UNUSED;
{
if (LOCAL_SYMBOL_CHECK (addme))
abort ();
valueT final_val;
segT final_seg;
+#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (symp))
{
struct local_symbol *locsym = (struct local_symbol *) symp;
return final_val;
}
+#endif
if (symp->sy_resolved)
{
expressions, such as IEEE-695. */
/* Don't emit messages unless we're finalizing the symbol value,
otherwise we may get the same message multiple times. */
- if ((seg_left != absolute_section || seg_right != absolute_section)
- && (op != O_subtract || seg_left != seg_right)
+ if ((seg_left != absolute_section
+ || seg_right != absolute_section)
+ && (op != O_subtract
+ || seg_left != seg_right
+ || seg_left == undefined_section)
&& finalize)
{
char *file;
static void
resolve_local_symbol (key, value)
- const char *key;
+ const char *key ATTRIBUTE_UNUSED;
PTR value;
{
if (value != NULL)
know (n >= 0);
know (augend == 0 || augend == 1);
p = symbol_name_build;
+#ifdef LOCAL_LABEL_PREFIX
+ *p++ = LOCAL_LABEL_PREFIX;
+#endif
*p++ = 'L';
/* Next code just does sprintf( {}, "%d", n); */
S_GET_VALUE (s)
symbolS *s;
{
+#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
return ((struct local_symbol *) s)->lsy_offset;
+#endif
if (!s->sy_resolved && s->sy_value.X_op != O_constant)
resolve_symbol_value (s, 1);
symbolS *s;
valueT val;
{
+#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
{
((struct local_symbol *) s)->lsy_offset = val;
return;
}
+#endif
s->sy_value.X_op = O_constant;
s->sy_value.X_add_number = (offsetT) val;
symbolS *dest, *src;
{
if (LOCAL_SYMBOL_CHECK (dest))
- abort ();
+ dest = local_symbol_convert ((struct local_symbol *) dest);
if (LOCAL_SYMBOL_CHECK (src))
- abort ();
+ src = local_symbol_convert ((struct local_symbol *) src);
#ifdef BFD_ASSEMBLER
/* In an expression, transfer the settings of these flags.
symbolS *s;
fragS *f;
{
+#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
{
local_symbol_set_frag ((struct local_symbol *) s, f);
return;
}
+#endif
s->sy_frag = f;
}
symbol_get_frag (s)
symbolS *s;
{
+#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
return local_symbol_get_frag ((struct local_symbol *) s);
+#endif
return s->sy_frag;
}
symbol_mark_resolved (s)
symbolS *s;
{
+#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
{
local_symbol_mark_resolved ((struct local_symbol *) s);
return;
}
+#endif
s->sy_resolved = 1;
}
symbol_resolved_p (s)
symbolS *s;
{
+#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
return local_symbol_resolved_p ((struct local_symbol *) s);
+#endif
return s->sy_resolved;
}
int
symbol_section_p (s)
- symbolS *s;
+ symbolS *s ATTRIBUTE_UNUSED;
{
if (LOCAL_SYMBOL_CHECK (s))
return 0;
/* Set the processor information for a symbol. */
void
-symbol_set_obj (s, o)
+symbol_set_tc (s, o)
symbolS *s;
TC_SYMFIELD_TYPE *o;
{
if (LOCAL_SYMBOL_CHECK (sym))
{
+#ifdef BFD_ASSEMBLER
struct local_symbol *locsym = (struct local_symbol *) sym;
if (local_symbol_get_frag (locsym) != &zero_address_frag
&& local_symbol_get_frag (locsym) != NULL)
if (local_symbol_resolved_p (locsym))
fprintf (file, " resolved");
fprintf (file, " local");
+#endif
}
else
{
{
indent_level++;
fprintf (file, "\n%*s<", indent_level * 4, "");
+#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (sym))
fprintf (file, "constant %lx",
(long) ((struct local_symbol *) sym)->lsy_offset);
else
+#endif
print_expr_1 (file, &sym->sy_value);
fprintf (file, ">");
indent_level--;