mirror of
https://github.com/golang/go
synced 2024-09-24 05:10:13 -06:00
ld: fixes ldpe link with SXREF global values.
R=golang-dev, mattn.jp, rsc CC=golang-dev https://golang.org/cl/4794052
This commit is contained in:
parent
b9b204d55d
commit
4e5e12e305
@ -327,6 +327,10 @@ ldpe(Biobuf *f, char *pkg, int64 len, char *pn)
|
|||||||
if(sym->sectnum == 0) {// extern
|
if(sym->sectnum == 0) {// extern
|
||||||
if(s->type == SDYNIMPORT)
|
if(s->type == SDYNIMPORT)
|
||||||
s->plt = -2; // flag for dynimport in PE object files.
|
s->plt = -2; // flag for dynimport in PE object files.
|
||||||
|
if (s->type == SXREF && sym->value > 0) {// global data
|
||||||
|
s->type = SDATA;
|
||||||
|
s->size = sym->value;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
} else if (sym->sectnum > 0) {
|
} else if (sym->sectnum > 0) {
|
||||||
sect = &obj->sect[sym->sectnum-1];
|
sect = &obj->sect[sym->sectnum-1];
|
||||||
|
Loading…
Reference in New Issue
Block a user