aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2011-10-18 15:31:55 +1100
committerAlex Brainman <alex.brainman@gmail.com>2011-10-18 15:31:55 +1100
commitc9bf048337c1a68d467195b3b747073f76e5f063 (patch)
treec85c645a6c67141d987cbb5f225368d31f7fa846
parent82704f04ef0a8d6dcc437c9e4a9740abbb813485 (diff)
downloadgo-c9bf048337c1a68d467195b3b747073f76e5f063.tar.gz
go-c9bf048337c1a68d467195b3b747073f76e5f063.zip
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
-rw-r--r--src/cmd/ld/pe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/ld/pe.c b/src/cmd/ld/pe.c
index df6c95976f..2e50490cec 100644
--- a/src/cmd/ld/pe.c
+++ b/src/cmd/ld/pe.c
@@ -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);