Commit 8559e3ad authored by Rob Pike's avatar Rob Pike

diagnose missing symbols instead of

silently miscompiling.

R=rsc
OCL=22872
CL=22872
parent 2ab55776
......@@ -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;
......
......@@ -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);
}
......@@ -137,6 +137,7 @@ struct Movtab
enum
{
Sxxx,
STEXT = 1,
SDATA,
SBSS,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment