static void mark(Sym *s) { if(s == S || s->reachable) return; s->reachable = 1; if(s->text) marktext(s->text); if(s->data) markdata(s->data, s); if(s->gotype) mark(s->gotype); }
void mark(Sym *s) { int i; if(s == S || s->reachable) return; if(strncmp(s->name, "weak.", 5) == 0) return; s->reachable = 1; if(s->text) marktext(s); for(i=0; i<s->nr; i++) mark(s->r[i].sym); if(s->gotype) mark(s->gotype); if(s->sub) mark(s->sub); if(s->outer) mark(s->outer); }