Commit 3199a6ca authored by Wei Guangjing's avatar Wei Guangjing Committed by Russ Cox

ld: fix .bss for ldpe.

Fixes #2409.

R=mattn.jp, rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/5334046
parent 252ef18d
......@@ -283,7 +283,7 @@ ldpe(Biobuf *f, char *pkg, int64 len, char *pn)
case IMAGE_REL_I386_REL32:
case IMAGE_REL_AMD64_REL32:
rp->type = D_PCREL;
rp->add = 0;
rp->add = le32(rsect->base+rp->off);
break;
case IMAGE_REL_I386_DIR32NB:
case IMAGE_REL_I386_DIR32:
......@@ -408,7 +408,7 @@ readsym(PeObj *obj, int i, PeSym **y)
sym = &obj->pesym[i];
*y = sym;
if(sym->sclass == IMAGE_SYM_CLASS_STATIC && sym->value == 0 && sym->type == 0) // section
if(sym->name[0] == '.') // .section
name = obj->sect[sym->sectnum-1].sym->name;
else {
name = sym->name;
......
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