Commit 8ba4df2e authored by Wei Guangjing's avatar Wei Guangjing Committed by Alex Brainman

6l: pe fixes

R=rsc, brainman
CC=golang-dev
https://golang.org/cl/4182061
parent 42ed1ad4
......@@ -289,7 +289,7 @@ patch(void)
// a different method is used to access them.
if(p->from.type == D_INDIR+D_GS
&& p->to.type >= D_AX && p->to.type <= D_DI
&& p->from.offset != 0x58) {
&& p->from.offset <= 8) {
q = appendp(p);
q->from = p->from;
q->from.type = D_INDIR + p->to.type;
......
......@@ -500,6 +500,7 @@ asmbpe(void)
IMAGE_FILE_EXECUTABLE_IMAGE|IMAGE_FILE_DEBUG_STRIPPED;
if (pe64) {
fh.SizeOfOptionalHeader = sizeof(oh64);
fh.Characteristics |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
set(Magic, 0x20b); // PE32+
} else {
fh.SizeOfOptionalHeader = sizeof(oh);
......
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