1
0
mirror of https://github.com/golang/go synced 2024-11-25 07:07:57 -07: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:
Wei Guangjing 2011-07-22 21:21:08 -04:00 committed by Russ Cox
parent b9b204d55d
commit 4e5e12e305

View File

@ -327,6 +327,10 @@ ldpe(Biobuf *f, char *pkg, int64 len, char *pn)
if(sym->sectnum == 0) {// extern
if(s->type == SDYNIMPORT)
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;
} else if (sym->sectnum > 0) {
sect = &obj->sect[sym->sectnum-1];