From: Rob Pike Date: Thu, 15 Jan 2009 23:21:12 +0000 (-0800) Subject: diagnose missing symbols instead of X-Git-Tag: weekly.2009-11-06~2370 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8559e3ad542b96ab9de267912e194fee8df04206;p=gostls13.git diagnose missing symbols instead of silently miscompiling. R=rsc OCL=22872 CL=22872 --- diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c index fec8fd0e16..68e7ec54cf 100644 --- a/src/cmd/6l/asm.c +++ b/src/cmd/6l/asm.c @@ -708,6 +708,8 @@ datblk(int32 s, int32 n) if(p->to.sym) { if(p->to.sym->type == SUNDEF) ckoff(p->to.sym, o); + if(p->to.sym->type == Sxxx) + diag("missing symbol %s", p->to.sym->name); o += p->to.sym->value; if(p->to.sym->type != STEXT && p->to.sym->type != SUNDEF) o += INITDAT; diff --git a/src/cmd/6l/go.c b/src/cmd/6l/go.c index 5128c51fa9..06eea3407a 100644 --- a/src/cmd/6l/go.c +++ b/src/cmd/6l/go.c @@ -487,6 +487,6 @@ definetypesigs(void) prog->to.offset = n; if(debug['v']) - Bprint(&bso, "%5.2f typestrings %d\n", cputime(), n); + Bprint(&bso, "%5.2f typesigs %d\n", cputime(), n); } diff --git a/src/cmd/6l/l.h b/src/cmd/6l/l.h index 7367bfec2a..e6ce0e7b23 100644 --- a/src/cmd/6l/l.h +++ b/src/cmd/6l/l.h @@ -137,6 +137,7 @@ struct Movtab enum { + Sxxx, STEXT = 1, SDATA, SBSS,