mirror of
https://github.com/golang/go
synced 2024-11-20 06:04:52 -07:00
6l: more invalid input files
Fixes #963. Fixes #964. R=r CC=golang-dev https://golang.org/cl/1874045
This commit is contained in:
parent
bbf925aa56
commit
9a442211c6
@ -427,21 +427,15 @@ zaddr(char *pn, Biobuf *f, Adr *a, Sym *h[])
|
||||
}
|
||||
if(t & T_TYPE)
|
||||
a->type = Bgetc(f);
|
||||
if(a->type < 0 || a->type >= D_SIZE)
|
||||
mangle(pn);
|
||||
adrgotype = S;
|
||||
if(t & T_GOTYPE)
|
||||
adrgotype = zsym(pn, f, h);
|
||||
s = a->sym;
|
||||
if(s == S) {
|
||||
switch(a->type) {
|
||||
case D_SIZE:
|
||||
mangle(pn);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
t = a->type;
|
||||
if(t != D_AUTO && t != D_PARAM) {
|
||||
if(adrgotype)
|
||||
if(s && adrgotype)
|
||||
s->gotype = adrgotype;
|
||||
return;
|
||||
}
|
||||
@ -581,6 +575,15 @@ loop:
|
||||
zaddr(pn, f, &p->from, h);
|
||||
fromgotype = adrgotype;
|
||||
zaddr(pn, f, &p->to, h);
|
||||
|
||||
switch(p->as) {
|
||||
case ATEXT:
|
||||
case ADATA:
|
||||
case AGLOBL:
|
||||
if(p->from.sym == S)
|
||||
mangle(pn);
|
||||
break;
|
||||
}
|
||||
|
||||
if(debug['W'])
|
||||
print("%P\n", p);
|
||||
|
@ -904,6 +904,6 @@ iconv(Fmt *fp)
|
||||
void
|
||||
mangle(char *file)
|
||||
{
|
||||
fprint(2, "%s; mangled input file\n", file);
|
||||
fprint(2, "%s: mangled input file\n", file);
|
||||
errorexit();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user