1
0
mirror of https://github.com/golang/go synced 2024-11-26 02:27:56 -07:00

cmd/5l: fix build (define stub machoreloc1)

R=ken2
CC=golang-dev
https://golang.org/cl/7694043
This commit is contained in:
Russ Cox 2013-03-11 01:27:03 -04:00
parent 761c386770
commit 72dd01451f

View File

@ -295,6 +295,16 @@ elfsetupplt(void)
} }
} }
int
machoreloc1(Reloc *r, vlong sectoff)
{
USED(r);
USED(sectoff);
return -1;
}
int int
archreloc(Reloc *r, Sym *s, vlong *val) archreloc(Reloc *r, Sym *s, vlong *val)
{ {
@ -325,15 +335,16 @@ archreloc(Reloc *r, Sym *s, vlong *val)
*val = braddoff((0xff000000U & (uint32)r->add), *val = braddoff((0xff000000U & (uint32)r->add),
(0xffffff & (uint32) (0xffffff & (uint32)
((symaddr(r->sym) + ((uint32)r->add) * 4 - (s->value + r->off)) / 4))); ((symaddr(r->sym) + ((uint32)r->add) * 4 - (s->value + r->off)) / 4)));
return 0; return 0;
} }
return -1; return -1;
} }
static Reloc * static Reloc *
addpltreloc(Sym *plt, Sym *got, Sym *sym, int typ) addpltreloc(Sym *plt, Sym *got, Sym *sym, int typ)
{ {
Reloc *r; Reloc *r;
r = addrel(plt); r = addrel(plt);
r->sym = got; r->sym = got;
r->off = plt->size; r->off = plt->size;