]> Cypherpunks repositories - gostls13.git/commitdiff
ld: bump pe linker version to 3.0 to allow code signing
authorMikkel Krautz <mikkel@krautz.dk>
Tue, 18 Oct 2011 04:31:55 +0000 (15:31 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Tue, 18 Oct 2011 04:31:55 +0000 (15:31 +1100)
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

src/cmd/ld/pe.c

index df6c95976f2e6f8e58d898e65a146b9c894dd291..2e50490cece010e584690ab999f5a17da7a0046b 100644 (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);