Commit 997b6f9d authored by Russ Cox's avatar Russ Cox

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