]> Cypherpunks repositories - gostls13.git/commitdiff
don't need two names for the same function (vputl and llputl).
authorRuss Cox <rsc@golang.org>
Fri, 20 Mar 2009 21:22:46 +0000 (14:22 -0700)
committerRuss Cox <rsc@golang.org>
Fri, 20 Mar 2009 21:22:46 +0000 (14:22 -0700)
also use thechar, to make copy/paste easier.

R=ken
OCL=26583
CL=26588

src/cmd/6l/asm.c
src/cmd/6l/obj.c

index 50675fad960f10561136bdb4fb72ffb05ae6a8ad..3857bc272d8317b014c3046f3c910b9a41c369b5 100644 (file)
@@ -82,7 +82,7 @@ lput(int32 l)
 }
 
 void
-llput(vlong v)
+vput(vlong v)
 {
        lput(v>>32);
        lput(v);
@@ -98,7 +98,7 @@ lputl(int32 l)
 }
 
 void
-llputl(vlong v)
+vputl(vlong v)
 {
        lputl(v);
        lputl(v>>32);
@@ -287,7 +287,7 @@ asmb(void)
                lput(PADDR(vl));                /* va of entry */
                lput(spsize);                   /* sp offsets */
                lput(lcsize);                   /* line offsets */
-               llput(vl);                      /* va of entry */
+               vput(vl);                       /* va of entry */
                break;
        case 3: /* plan9 */
                magic = 4*26*26+7;
@@ -402,7 +402,7 @@ asmb(void)
                        1);                     /* flag - zero fill */
 
                machdylink();
-               machstack(va+HEADR);
+               machstack(entryvalue());
 
                if (!debug['s']) {
                        machseg("__SYMDAT",
@@ -427,12 +427,12 @@ asmb(void)
                wputl(2);                       /* type = EXEC */
                wputl(62);                      /* machine = AMD64 */
                lputl(1L);                      /* version = CURRENT */
-               llputl(entryvalue());           /* entry vaddr */
-               llputl(64L);                    /* offset to first phdr */
+               vputl(entryvalue());            /* entry vaddr */
+               vputl(64L);                     /* offset to first phdr */
                np = 3;
                if(!debug['s'])
                        np++;
-               llputl(64L+56*np);              /* offset to first shdr */
+               vputl(64L+56*np);               /* offset to first shdr */
                lputl(0L);                      /* processor specific flags */
                wputl(64);                      /* Ehdr size */
                wputl(56);                      /* Phdr size */
@@ -780,13 +780,6 @@ rnd(vlong v, vlong r)
        return v;
 }
 
-void
-vputl(vlong v)
-{
-       lputl(v);
-       lputl(v>>32);
-}
-
 void
 machseg(char *name, vlong vaddr, vlong vsize, vlong foff, vlong fsize,
        uint32 prot1, uint32 prot2, uint32 nsect, uint32 flag)
@@ -941,12 +934,12 @@ linuxphdr(int type, int flags, vlong foff,
 
        lputl(type);                    /* text - type = PT_LOAD */
        lputl(flags);                   /* text - flags = PF_X+PF_R */
-       llputl(foff);                   /* file offset */
-       llputl(vaddr);                  /* vaddr */
-       llputl(paddr);                  /* paddr */
-       llputl(filesize);               /* file size */
-       llputl(memsize);                /* memory size */
-       llputl(align);                  /* alignment */
+       vputl(foff);                    /* file offset */
+       vputl(vaddr);                   /* vaddr */
+       vputl(paddr);                   /* paddr */
+       vputl(filesize);                /* file size */
+       vputl(memsize);         /* memory size */
+       vputl(align);                   /* alignment */
 }
 
 void
@@ -955,14 +948,14 @@ linuxshdr(char *name, uint32 type, vlong flags, vlong addr, vlong off,
 {
        lputl(stroffset);
        lputl(type);
-       llputl(flags);
-       llputl(addr);
-       llputl(off);
-       llputl(size);
+       vputl(flags);
+       vputl(addr);
+       vputl(off);
+       vputl(size);
        lputl(link);
        lputl(info);
-       llputl(align);
-       llputl(entsize);
+       vputl(align);
+       vputl(entsize);
 
        if(name != nil)
                stroffset += strlen(name)+1;
index b682ab1b1b3c12f8a35a55aa86c8e513271d00a7..2a0df3237e4aaa5237693a707eadf5512ec22a43 100644 (file)
@@ -355,7 +355,7 @@ main(int argc, char *argv[])
 
        if(!debug['l']) {
                a = mal(strlen(goroot)+strlen(goarch)+strlen(goos)+20);
-               sprint(a, "%s/lib/rt0_%s_%s.6", goroot, goarch, goos);
+               sprint(a, "%s/lib/rt0_%s_%s.%c", goroot, goarch, goos, thechar);
                objfile(a);
        }