Commit 58b86e50 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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
parent cc08d923
...@@ -571,7 +571,7 @@ void linkprfile(Link *ctxt, int32 l); ...@@ -571,7 +571,7 @@ void linkprfile(Link *ctxt, int32 l);
// objfile.c // objfile.c
void ldobjfile(Link *ctxt, Biobuf *b, char *pkg, int64 len, char *path); 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 // pass.c
Prog* brchain(Link *ctxt, Prog *p); Prog* brchain(Link *ctxt, Prog *p);
......
...@@ -172,7 +172,7 @@ assemble(char *file) ...@@ -172,7 +172,7 @@ assemble(char *file)
return nerrors; return nerrors;
} }
linkwriteobj(ctxt, &obuf); writeobj(ctxt, &obuf);
Bflush(&obuf); Bflush(&obuf);
return 0; return 0;
} }
......
...@@ -365,7 +365,7 @@ outcode(void) ...@@ -365,7 +365,7 @@ outcode(void)
} }
Bprint(&outbuf, "!\n"); Bprint(&outbuf, "!\n");
linkwriteobj(ctxt, &outbuf); writeobj(ctxt, &outbuf);
lastp = P; lastp = P;
} }
......
...@@ -182,7 +182,7 @@ assemble(char *file) ...@@ -182,7 +182,7 @@ assemble(char *file)
return nerrors; return nerrors;
} }
linkwriteobj(ctxt, &obuf); writeobj(ctxt, &obuf);
Bflush(&obuf); Bflush(&obuf);
return 0; return 0;
} }
......
...@@ -239,7 +239,7 @@ outcode(void) ...@@ -239,7 +239,7 @@ outcode(void)
} }
Bprint(&b, "!\n"); Bprint(&b, "!\n");
linkwriteobj(ctxt, &b); writeobj(ctxt, &b);
Bterm(&b); Bterm(&b);
close(f); close(f);
lastp = P; lastp = P;
......
...@@ -177,7 +177,7 @@ assemble(char *file) ...@@ -177,7 +177,7 @@ assemble(char *file)
return nerrors; return nerrors;
} }
linkwriteobj(ctxt, &obuf); writeobj(ctxt, &obuf);
Bflush(&obuf); Bflush(&obuf);
return 0; return 0;
} }
......
...@@ -244,7 +244,7 @@ outcode(void) ...@@ -244,7 +244,7 @@ outcode(void)
} }
Bprint(&b, "!\n"); Bprint(&b, "!\n");
linkwriteobj(ctxt, &b); writeobj(ctxt, &b);
Bterm(&b); Bterm(&b);
close(f); close(f);
lastp = P; lastp = P;
......
...@@ -87,7 +87,7 @@ dumpobj(void) ...@@ -87,7 +87,7 @@ dumpobj(void)
ggloblsym(zero, zerosize, 1, 1); ggloblsym(zero, zerosize, 1, 1);
dumpdata(); dumpdata();
linkwriteobj(ctxt, bout); writeobj(ctxt, bout);
if(writearchive) { if(writearchive) {
Bflush(bout); Bflush(bout);
......
...@@ -114,8 +114,11 @@ static char *rdstring(Biobuf*); ...@@ -114,8 +114,11 @@ static char *rdstring(Biobuf*);
static void rddata(Biobuf*, uchar**, int*); static void rddata(Biobuf*, uchar**, int*);
static LSym *rdsym(Link*, Biobuf*, char*); 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 void
linkwriteobj(Link *ctxt, Biobuf *b) writeobj(Link *ctxt, Biobuf *b)
{ {
int flag; int flag;
Hist *h; Hist *h;
......
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