]> Cypherpunks repositories - gostls13.git/commitdiff
liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj
authorIan Lance Taylor <iant@golang.org>
Wed, 16 Apr 2014 21:36:44 +0000 (14:36 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 16 Apr 2014 21:36:44 +0000 (14:36 -0700)
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

include/link.h
src/cmd/5a/lex.c
src/cmd/5c/swt.c
src/cmd/6a/lex.c
src/cmd/6c/swt.c
src/cmd/8a/lex.c
src/cmd/8c/swt.c
src/cmd/gc/obj.c
src/liblink/objfile.c

index c4a6c3dea6e4ba5e1a997e8d49f4fe9cead36162..a80b62084a900fd4d40719e1e7a3a2638ac75cc6 100644 (file)
@@ -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);
index 906eee641af90df60004e4b6478d2c7a1d7912a6..571fdf7f26781013b8688a3167f3f68336a50bed 100644 (file)
@@ -172,7 +172,7 @@ assemble(char *file)
                        return nerrors;
        }
 
-       linkwriteobj(ctxt, &obuf);
+       writeobj(ctxt, &obuf);
        Bflush(&obuf);
        return 0;
 }
index 97c2e6c84e8534087219e4c41fc0f653176c5338..fd81a4e68abde5dcce4f0c7680a4eb761dc246ab 100644 (file)
@@ -365,7 +365,7 @@ outcode(void)
        }
        Bprint(&outbuf, "!\n");
 
-       linkwriteobj(ctxt, &outbuf);
+       writeobj(ctxt, &outbuf);
        lastp = P;
 }
 
index 4ebcc175c3518919e4c8edaedc129e037c208320..167e6b6c17cd92760bd95545f7d43a3e44abf667 100644 (file)
@@ -182,7 +182,7 @@ assemble(char *file)
                        return nerrors;
        }
 
-       linkwriteobj(ctxt, &obuf);
+       writeobj(ctxt, &obuf);
        Bflush(&obuf);
        return 0;
 }
index c46207d34a1861d84cf6180d3fa14d5a76240549..d7713648debcc658075f120d782421dcaac3b061 100644 (file)
@@ -239,7 +239,7 @@ outcode(void)
        }
        Bprint(&b, "!\n");
 
-       linkwriteobj(ctxt, &b);
+       writeobj(ctxt, &b);
        Bterm(&b);
        close(f);
        lastp = P;
index 79a9488e4bfdecb1a82a2e1b35c6b75f888b2969..32c099b75a96f4c8ae81b780a31bfeef5de04b0c 100644 (file)
@@ -177,7 +177,7 @@ assemble(char *file)
                        return nerrors;
        }
 
-       linkwriteobj(ctxt, &obuf);
+       writeobj(ctxt, &obuf);
        Bflush(&obuf);
        return 0;
 }
index 54fb0881f8b54f0779a0e23b637176ef11886da2..ae36f84eaca12be8b2eeb01be60bef04854569af 100644 (file)
@@ -244,7 +244,7 @@ outcode(void)
        }
        Bprint(&b, "!\n");
 
-       linkwriteobj(ctxt, &b);
+       writeobj(ctxt, &b);
        Bterm(&b);
        close(f);
        lastp = P;
index b5b8df510f2f30781d30ad68ec53c6f1eb0daa0e..4eeb03aa8e4de4072fbd1d8fbd3deab84087ed9a 100644 (file)
@@ -87,7 +87,7 @@ dumpobj(void)
        ggloblsym(zero, zerosize, 1, 1);
 
        dumpdata();
-       linkwriteobj(ctxt, bout);
+       writeobj(ctxt, bout);
 
        if(writearchive) {
                Bflush(bout);
index 0c51e795f5582acdfe79cbdcb60265e593760c6b..271620a1e81ee67135b8178dee0927aa91e06653 100644 (file)
@@ -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;