Commit e69b9ddd authored by Russ Cox's avatar Russ Cox

ld: do not emit reference to dynamic library named ""

Fixes #1778.

R=ken2
CC=golang-dev
https://golang.org/cl/4550047
parent 2d310a00
...@@ -89,6 +89,9 @@ needlib(char *name) ...@@ -89,6 +89,9 @@ needlib(char *name)
char *p; char *p;
Sym *s; Sym *s;
if(*name == '\0')
return 0;
/* reuse hash code in symbol table */ /* reuse hash code in symbol table */
p = smprint(".dynlib.%s", name); p = smprint(".dynlib.%s", name);
s = lookup(p, 0); s = lookup(p, 0);
......
...@@ -108,6 +108,9 @@ needlib(char *name) ...@@ -108,6 +108,9 @@ needlib(char *name)
char *p; char *p;
Sym *s; Sym *s;
if(*name == '\0')
return 0;
/* reuse hash code in symbol table */ /* reuse hash code in symbol table */
p = smprint(".elfload.%s", name); p = smprint(".elfload.%s", name);
s = lookup(p, 0); s = lookup(p, 0);
......
...@@ -104,6 +104,9 @@ needlib(char *name) ...@@ -104,6 +104,9 @@ needlib(char *name)
char *p; char *p;
Sym *s; Sym *s;
if(*name == '\0')
return 0;
/* reuse hash code in symbol table */ /* reuse hash code in symbol table */
p = smprint(".dynlib.%s", name); p = smprint(".dynlib.%s", name);
s = lookup(p, 0); s = lookup(p, 0);
......
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