1
0
mirror of https://github.com/golang/go synced 2024-11-20 09:34:52 -07:00

ld: bump pe linker version to 3.0 to allow code signing

The Windows signtool.exe thinks our binaries are 'invalid
Win32 programs' unless the PE linker version field is 3.0
or greater.

This minor change makes it possible to successfully sign
gc-built binaries on Windows.

R=golang-dev, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/5268045
This commit is contained in:
Mikkel Krautz 2011-10-18 15:31:55 +11:00 committed by Alex Brainman
parent 82704f04ef
commit c9bf048337

View File

@ -620,7 +620,7 @@ asmbpe(void)
set(Magic, 0x10b); // PE32
oh.BaseOfData = d->VirtualAddress;
}
set(MajorLinkerVersion, 1);
set(MajorLinkerVersion, 3);
set(MinorLinkerVersion, 0);
set(SizeOfCode, t->SizeOfRawData);
set(SizeOfInitializedData, d->SizeOfRawData);