mirror of
https://github.com/golang/go
synced 2024-11-11 20:01:37 -07:00
liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj
The name linkwriteobj is misleading because it implies that the function has something to do with the linker, which it does not. The name is historical: the function performs an operation that was previously performed by the linker, but no longer is. LGTM=rsc R=rsc, minux.ma CC=golang-codereviews https://golang.org/cl/88210045
This commit is contained in:
parent
cc08d9232c
commit
58b86e5013
@ -571,7 +571,7 @@ void linkprfile(Link *ctxt, int32 l);
|
||||
|
||||
// objfile.c
|
||||
void ldobjfile(Link *ctxt, Biobuf *b, char *pkg, int64 len, char *path);
|
||||
void linkwriteobj(Link *ctxt, Biobuf *b);
|
||||
void writeobj(Link *ctxt, Biobuf *b);
|
||||
|
||||
// pass.c
|
||||
Prog* brchain(Link *ctxt, Prog *p);
|
||||
|
@ -172,7 +172,7 @@ assemble(char *file)
|
||||
return nerrors;
|
||||
}
|
||||
|
||||
linkwriteobj(ctxt, &obuf);
|
||||
writeobj(ctxt, &obuf);
|
||||
Bflush(&obuf);
|
||||
return 0;
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ outcode(void)
|
||||
}
|
||||
Bprint(&outbuf, "!\n");
|
||||
|
||||
linkwriteobj(ctxt, &outbuf);
|
||||
writeobj(ctxt, &outbuf);
|
||||
lastp = P;
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ assemble(char *file)
|
||||
return nerrors;
|
||||
}
|
||||
|
||||
linkwriteobj(ctxt, &obuf);
|
||||
writeobj(ctxt, &obuf);
|
||||
Bflush(&obuf);
|
||||
return 0;
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ outcode(void)
|
||||
}
|
||||
Bprint(&b, "!\n");
|
||||
|
||||
linkwriteobj(ctxt, &b);
|
||||
writeobj(ctxt, &b);
|
||||
Bterm(&b);
|
||||
close(f);
|
||||
lastp = P;
|
||||
|
@ -177,7 +177,7 @@ assemble(char *file)
|
||||
return nerrors;
|
||||
}
|
||||
|
||||
linkwriteobj(ctxt, &obuf);
|
||||
writeobj(ctxt, &obuf);
|
||||
Bflush(&obuf);
|
||||
return 0;
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ outcode(void)
|
||||
}
|
||||
Bprint(&b, "!\n");
|
||||
|
||||
linkwriteobj(ctxt, &b);
|
||||
writeobj(ctxt, &b);
|
||||
Bterm(&b);
|
||||
close(f);
|
||||
lastp = P;
|
||||
|
@ -87,7 +87,7 @@ dumpobj(void)
|
||||
ggloblsym(zero, zerosize, 1, 1);
|
||||
|
||||
dumpdata();
|
||||
linkwriteobj(ctxt, bout);
|
||||
writeobj(ctxt, bout);
|
||||
|
||||
if(writearchive) {
|
||||
Bflush(bout);
|
||||
|
@ -114,8 +114,11 @@ static char *rdstring(Biobuf*);
|
||||
static void rddata(Biobuf*, uchar**, int*);
|
||||
static LSym *rdsym(Link*, Biobuf*, char*);
|
||||
|
||||
// The Go and C compilers, and the assembler, call writeobj to write
|
||||
// out a Go object file. The linker does not call this; the linker
|
||||
// does not write out object files.
|
||||
void
|
||||
linkwriteobj(Link *ctxt, Biobuf *b)
|
||||
writeobj(Link *ctxt, Biobuf *b)
|
||||
{
|
||||
int flag;
|
||||
Hist *h;
|
||||
|
Loading…
Reference in New Issue
Block a user