aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ld
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-12-15 17:20:26 -0500
committerRuss Cox <rsc@golang.org>2010-12-15 17:20:26 -0500
commit33405ecc869ca70b1dcddb4112bee8e21e375470 (patch)
tree269a4ce20211cf140de76ebebfb0f1e40c2a4e20 /src/cmd/ld
parent1a072f4b37f7d2a5bc3fb7a43cb9003e122acd5e (diff)
downloadgo-33405ecc869ca70b1dcddb4112bee8e21e375470.tar.xz
fix freebsd build
R=iant, r CC=dho, golang-dev https://golang.org/cl/3687041
Diffstat (limited to 'src/cmd/ld')
-rw-r--r--src/cmd/ld/data.c4
-rw-r--r--src/cmd/ld/go.c9
-rw-r--r--src/cmd/ld/lib.h2
3 files changed, 13 insertions, 2 deletions
diff --git a/src/cmd/ld/data.c b/src/cmd/ld/data.c
index eedfd7930e..043798c455 100644
--- a/src/cmd/ld/data.c
+++ b/src/cmd/ld/data.c
@@ -165,9 +165,9 @@ relocsym(Sym *s)
if(r->type >= 256)
continue;
- if(r->sym != S && (r->sym->type == SDYNIMPORT || r->sym->dynimpname != nil))
+ if(r->sym != S && r->sym->type == SDYNIMPORT)
if (thechar != '8' || HEADTYPE != 10) // Windows PE supports relocation references to dynamic import symbols
- diag("unhandled relocation for %s (rtype %d)", r->sym->name, r->type);
+ diag("unhandled relocation for %s (type %d rtype %d)", r->sym->name, r->sym->type, r->type);
if(r->sym != S && !r->sym->reachable)
diag("unreachable sym in relocation: %s %s", s->name, r->sym->name);
diff --git a/src/cmd/ld/go.c b/src/cmd/ld/go.c
index 607cc3f3ad..00318fe115 100644
--- a/src/cmd/ld/go.c
+++ b/src/cmd/ld/go.c
@@ -658,3 +658,12 @@ deadcode(void)
else
last->next = nil;
}
+
+void
+addexport(void)
+{
+ int i;
+
+ for(i=0; i<ndynexp; i++)
+ adddynsym(dynexp[i]);
+}
diff --git a/src/cmd/ld/lib.h b/src/cmd/ld/lib.h
index 0f933013df..450135a7f5 100644
--- a/src/cmd/ld/lib.h
+++ b/src/cmd/ld/lib.h
@@ -161,6 +161,8 @@ void genasmsym(void (*put)(Sym*, char*, int, vlong, vlong, int, Sym*));
vlong datoff(vlong);
void adddynlib(char*);
int archreloc(Reloc*, Sym*, vlong*);
+void adddynsym(Sym*);
+void addexport(void);
int pathchar(void);
void* mal(uint32);