Statics aligned to greater than a page cause linker error #70144
Labels
A-linkage
Area: linking into static, shared libraries and binaries
C-bug
Category: This is a bug.
O-windows-msvc
Toolchain: MSVC, Operating system: Windows
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
On Windows
link.exe
requires that the alignment of any section is less than or equal to the/ALIGN
value. Statics with an alignment of 8192 or greater cause the section to have an alignment of 8192 (but not greater, see #70022), butlink.exe
has a default/ALIGN
of 4096 causingfatal error LNK1164: section 0x6 alignment (8192) greater than /ALIGN value
. Specifying-Clink-arg="/ALIGN:8192"
causes the error to go away.Minimal example
The text was updated successfully, but these errors were encountered: