From: Russ Cox Date: Fri, 20 Mar 2009 21:22:46 +0000 (-0700) Subject: don't need two names for the same function (vputl and llputl). X-Git-Tag: weekly.2009-11-06~1996 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=997b6f9d89067c5d48c072ebcdcf288ba4f9e1d2;p=gostls13.git don't need two names for the same function (vputl and llputl). also use thechar, to make copy/paste easier. R=ken OCL=26583 CL=26588 --- diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c index 50675fad96..3857bc272d 100644 --- a/src/cmd/6l/asm.c +++ b/src/cmd/6l/asm.c @@ -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; diff --git a/src/cmd/6l/obj.c b/src/cmd/6l/obj.c index b682ab1b1b..2a0df3237e 100644 --- a/src/cmd/6l/obj.c +++ b/src/cmd/6l/obj.c @@ -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); }