mirror of
https://github.com/golang/go
synced 2024-11-22 18:24:48 -07:00
ld: fix handling of "". names in #pragma dynimport/dynexport
Fixes #728. R=r CC=golang-dev https://golang.org/cl/1706053
This commit is contained in:
parent
520d5db4d3
commit
44eaaaaa78
@ -66,7 +66,7 @@ ilookup(char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void loadpkgdata(char*, char*, char*, int);
|
static void loadpkgdata(char*, char*, char*, int);
|
||||||
static void loaddynimport(char*, char*, int);
|
static void loaddynimport(char*, char*, char*, int);
|
||||||
static void loaddynexport(char*, char*, char*, int);
|
static void loaddynexport(char*, char*, char*, int);
|
||||||
static int parsemethod(char**, char*, char**);
|
static int parsemethod(char**, char*, char**);
|
||||||
static int parsepkgdata(char*, char*, char**, char*, char**, char**, char**);
|
static int parsepkgdata(char*, char*, char**, char*, char**, char**, char**);
|
||||||
@ -194,7 +194,7 @@ ldpkg(Biobuf *f, char *pkg, int64 len, char *filename, int whence)
|
|||||||
errorexit();
|
errorexit();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loaddynimport(filename, p0 + 1, p1 - (p0+1));
|
loaddynimport(filename, pkg, p0 + 1, p1 - (p0+1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// look for dynexp section
|
// look for dynexp section
|
||||||
@ -397,7 +397,7 @@ parsemethod(char **pp, char *ep, char **methp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
loaddynimport(char *file, char *p, int n)
|
loaddynimport(char *file, char *pkg, char *p, int n)
|
||||||
{
|
{
|
||||||
char *pend, *next, *name, *def, *p0, *lib;
|
char *pend, *next, *name, *def, *p0, *lib;
|
||||||
Sym *s;
|
Sym *s;
|
||||||
@ -432,6 +432,8 @@ loaddynimport(char *file, char *p, int n)
|
|||||||
*strchr(name, ' ') = 0;
|
*strchr(name, ' ') = 0;
|
||||||
*strchr(def, ' ') = 0;
|
*strchr(def, ' ') = 0;
|
||||||
|
|
||||||
|
name = expandpkg(name, pkg);
|
||||||
|
|
||||||
s = lookup(name, 0);
|
s = lookup(name, 0);
|
||||||
s->dynimplib = lib;
|
s->dynimplib = lib;
|
||||||
s->dynimpname = def;
|
s->dynimpname = def;
|
||||||
|
Loading…
Reference in New Issue
Block a user