]> Cypherpunks repositories - gostls13.git/commit
cmd/link: set pe section and file alignment to 0 during external linking
authorAlex Brainman <alex.brainman@gmail.com>
Sun, 5 Feb 2017 03:19:19 +0000 (14:19 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Thu, 16 Feb 2017 04:33:17 +0000 (04:33 +0000)
commite31144f128e2a491845dc4fcc57d45e22fc1b963
tree1d6a8bcfcec5c3094a65d9177b33adaf74e5b0b2
parent64c02460d703f718a44326646d19c417eeb1999a
cmd/link: set pe section and file alignment to 0 during external linking

This is what gcc does when it generates object files.
And it is easier to count everything, when it starts from 0.
Make go linker do the same.

gcc also does not output IMAGE_OPTIONAL_HEADER or
PE64_IMAGE_OPTIONAL_HEADER for object files.
Perhaps we should do the same, but not in this CL.

For #10776.

Change-Id: I9789c337648623b6cfaa7d18d1ac9cef32e180dc
Reviewed-on: https://go-review.googlesource.com/36974
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/link/internal/amd64/obj.go
src/cmd/link/internal/ld/pe.go
src/cmd/link/internal/x86/obj.go