1
0
mirror of https://github.com/golang/go synced 2024-11-25 03:07:56 -07:00

loader: move the XputY routines into the ld directory.

Fixes the build for 5l, and also removes an inconsequential bug in 8l.

R=rsc
CC=golang-dev
https://golang.org/cl/4127051
This commit is contained in:
Rob Pike 2011-02-07 14:34:21 -08:00
parent b2b29814bf
commit fb55941539
7 changed files with 49 additions and 108 deletions

View File

@ -637,13 +637,6 @@ wput(int32 l)
cflush();
}
void
wputl(ushort w)
{
cput(w);
cput(w>>8);
}
void
hput(int32 l)
@ -671,20 +664,6 @@ lput(int32 l)
cflush();
}
void
lputl(int32 l)
{
cbp[3] = l>>24;
cbp[2] = l>>16;
cbp[1] = l>>8;
cbp[0] = l;
cbp += 4;
cbc -= 4;
if(cbc <= 0)
cflush();
}
void
cflush(void)
{

View File

@ -410,6 +410,7 @@ Sym* lookup(char*, int);
void cput(int);
void hput(int32);
void lput(int32);
void lputb(int32);
void lputl(int32);
void* mysbrk(uint32);
void names(void);

View File

@ -63,52 +63,6 @@ entryvalue(void)
return s->value;
}
void
wputl(uint16 w)
{
cput(w);
cput(w>>8);
}
void
wputb(uint16 w)
{
cput(w>>8);
cput(w);
}
void
lputb(int32 l)
{
cput(l>>24);
cput(l>>16);
cput(l>>8);
cput(l);
}
void
vputb(uint64 v)
{
lputb(v>>32);
lputb(v);
}
void
lputl(int32 l)
{
cput(l);
cput(l>>8);
cput(l>>16);
cput(l>>24);
}
void
vputl(uint64 v)
{
lputl(v);
lputl(v>>32);
}
vlong
datoff(vlong addr)
{

View File

@ -429,6 +429,7 @@ vlong rnd(vlong, vlong);
void span(void);
void undef(void);
vlong symaddr(Sym*);
void vputb(uint64);
void vputl(uint64);
void wputb(uint16);
void wputl(uint16);

View File

@ -59,45 +59,6 @@ entryvalue(void)
return s->value;
}
void
wputl(ushort w)
{
cput(w);
cput(w>>8);
}
void
wputb(ushort w)
{
cput(w>>8);
cput(w);
}
void
lputb(int32 l)
{
cput(l>>24);
cput(l>>16);
cput(l>>8);
cput(l);
}
void
lputl(int32 l)
{
cput(l);
cput(l>>8);
cput(l>>16);
cput(l>>24);
}
void
vputl(uvlong l)
{
lputl(l >> 32);
lputl(l);
}
vlong
datoff(vlong addr)
{

View File

@ -378,8 +378,7 @@ ldobj(Biobuf *f, char *pkg, int64 len, char *pn, int whence)
int n, c1, c2, c3, c4;
uint32 magic;
vlong import0, import1, eof;
char *fld[10], *s, *t;
int nfld;
char *t;
eof = Boffset(f) + len;

View File

@ -220,6 +220,52 @@ slputb(int32 v)
symt->size += 4;
}
void
wputl(ushort w)
{
cput(w);
cput(w>>8);
}
void
wputb(ushort w)
{
cput(w>>8);
cput(w);
}
void
lputb(int32 l)
{
cput(l>>24);
cput(l>>16);
cput(l>>8);
cput(l);
}
void
lputl(int32 l)
{
cput(l);
cput(l>>8);
cput(l>>16);
cput(l>>24);
}
void
vputb(uint64 v)
{
lputb(v>>32);
lputb(v);
}
void
vputl(uvlong v)
{
lputl(v);
lputl(v >> 32);
}
void
putsymb(Sym *s, char *name, int t, vlong v, vlong size, int ver, Sym *typ)
{