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);
// 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;
......
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