We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c20b8e1 commit d4f1309Copy full SHA for d4f1309
src/cmd/link/internal/ld/pe.go
@@ -1107,6 +1107,11 @@ func Asmbpe() {
1107
1108
t := addpesection(".text", int(Segtext.Length), int(Segtext.Length))
1109
t.Characteristics = IMAGE_SCN_CNT_CODE | IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ
1110
+ if Linkmode == LinkExternal {
1111
+ // some data symbols (e.g. masks) end up in the .text section, and they normally
1112
+ // expect larger alignment requirement than the default text section alignment.
1113
+ t.Characteristics |= IMAGE_SCN_ALIGN_32BYTES
1114
+ }
1115
chksectseg(t, &Segtext)
1116
textsect = pensect
1117
0 commit comments