1
0
mirror of https://github.com/golang/go synced 2024-11-20 10:24:40 -07:00

6l: pe fixes

R=rsc, brainman
CC=golang-dev
https://golang.org/cl/4182061
This commit is contained in:
Wei Guangjing 2011-02-18 10:58:47 +11:00 committed by Alex Brainman
parent 42ed1ad4a6
commit 8ba4df2e9a
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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);