{
const char *name_copy;
struct local_symbol *ret;
+ struct symbol_flags flags = { .sy_local_symbol = 1, .sy_resolved = 0 };
++local_symbol_count;
name_copy = save_symbol_name (name);
ret = (struct local_symbol *) obstack_alloc (¬es, sizeof *ret);
- ret->lsy_flags.sy_local_symbol = 1;
- ret->lsy_flags.sy_resolved = 0;
+ ret->lsy_flags = flags;
ret->lsy_name = name_copy;
ret->lsy_section = section;
local_symbol_set_frag (ret, frag);
*copy++ = TOUPPER (c);
*copy = '\0';
- if (copy2 != NULL)
- free (copy2);
+ free (copy2);
copy = (char *) name;
}
result = symbol_find_exact_noref (name, noref);
- if (copy != NULL)
- free (copy);
+ free (copy);
return result;
}
/* Don't leave symbol loops. */
if (finalize_syms
+ && !LOCAL_SYMBOL_CHECK (add_symbol)
&& add_symbol->sy_flags.sy_resolving)
break;