+2014-06-27 Alan Modra <amodra@gmail.com>
+
+ * config/obj-macho.c (obj_mach_o_set_symbol_qualifier): Don't set
+ SYM_MACHO_FIELDS_NOT_VALIDATED after reporting an error.
+ (obj_mach_o_frob_label): Avoid cascading errors.
+ (obj_mach_o_frob_symbol): Don't set SYM_MACHO_FIELDS_NOT_VALIDATED.
+
2014-06-18 DJ Delorie <dj@redhat.com>
* config/rx-parse.y (BSET, BCLR, BTST, BNOT, BMCMD): Make .B
bfd_mach_o_asymbol *s = (bfd_mach_o_asymbol *) symbol_get_bfdsym (sym);
bfd_mach_o_section *sec;
int sectype = -1;
- int err = 0;
/* If the symbol is defined, then we can do more rigorous checking on
the validity of the qualifiers. Otherwise, we are stuck with waiting
as_bad (_("'%s' previously declared as '%s'."), s->symbol.name,
(s->n_type & BFD_MACH_O_N_PEXT) ? "private extern"
: "global" );
- err = 1;
+ s->symbol.udata.i = SYM_MACHO_FIELDS_UNSET;
+ return 1;
}
else
{
as_bad (_("'%s' can't be a weak_definition (currently only"
" supported in sections of type coalesced)"),
s->symbol.name);
- err = 1;
+ s->symbol.udata.i = SYM_MACHO_FIELDS_UNSET;
+ return 1;
}
else
s->n_desc |= BFD_MACH_O_N_WEAK_DEF;
/* We've seen some kind of qualifier - check validity if or when the entity
is defined. */
s->symbol.udata.i = SYM_MACHO_FIELDS_NOT_VALIDATED;
- return err;
+ return 0;
}
/* Respond to symbol qualifiers.
{
if ((s->n_desc & BFD_MACH_O_N_WEAK_DEF)
&& sectype != BFD_MACH_O_S_COALESCED)
- as_bad (_("'%s' can't be a weak_definition (currently only supported"
- " in sections of type coalesced)"), s->symbol.name);
+ {
+ as_bad (_("'%s' can't be a weak_definition (currently only supported"
+ " in sections of type coalesced)"), s->symbol.name);
+ /* Don't cascade errors. */
+ s->symbol.udata.i = SYM_MACHO_FIELDS_UNSET;
+ }
/* Have we changed from an undefined to defined ref? */
s->n_desc &= ~(REFE | LAZY);
{
/* Anything here that should be added that is non-standard. */
s->n_desc &= ~BFD_MACH_O_REFERENCE_MASK;
- s->symbol.udata.i = SYM_MACHO_FIELDS_NOT_VALIDATED;
}
else if (s->symbol.udata.i == SYM_MACHO_FIELDS_NOT_VALIDATED)
{