/* Whether the symbol has been marked to be removed by a .symver
directive. */
unsigned int removed : 1;
+
+ /* Set when a warning about the symbol containing multibyte characters
+ is generated. */
+ unsigned int multibyte_warned : 1;
};
/* A pointer in the symbol may point to either a complete symbol
symbol_entry_find (htab_t table, const char *name)
{
hashval_t hash = htab_hash_string (name);
- symbol_entry_t needle = { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ symbol_entry_t needle = { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
hash, name, 0, 0, 0 } };
return htab_find_with_hash (table, &needle, hash);
}
symbolP->bsym->name = name;
symbolP->bsym->section = sec;
+ if (multibyte_handling == multibyte_warn_syms
+ && ! symbolP->flags.local_symbol
+ && sec != undefined_section
+ && ! symbolP->flags.multibyte_warned
+ && scan_for_multibyte_characters ((const unsigned char *) name,
+ (const unsigned char *) name + strlen (name),
+ false /* Do not warn. */))
+ {
+ as_warn (_("symbol '%s' contains multibyte characters"), name);
+ symbolP->flags.multibyte_warned = 1;
+ }
+
S_SET_VALUE (symbolP, valu);
symbol_clear_list_pointers (symbolP);
abort ();
}
else
- s->bsym->section = seg;
+ {
+ if (multibyte_handling == multibyte_warn_syms
+ && ! s->flags.local_symbol
+ && seg != undefined_section
+ && ! s->flags.multibyte_warned
+ && scan_for_multibyte_characters ((const unsigned char *) s->name,
+ (const unsigned char *) s->name + strlen (s->name),
+ false))
+ {
+ as_warn (_("symbol '%s' contains multibyte characters"), s->name);
+ s->flags.multibyte_warned = 1;
+ }
+
+ s->bsym->section = seg;
+ }
}
void