Commit 4e5e12e3 authored by Wei Guangjing's avatar Wei Guangjing Committed by Russ Cox

ld: fixes ldpe link with SXREF global values.

R=golang-dev, mattn.jp, rsc
CC=golang-dev
https://golang.org/cl/4794052
parent b9b204d5
...@@ -327,6 +327,10 @@ ldpe(Biobuf *f, char *pkg, int64 len, char *pn) ...@@ -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];
......
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