-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Statics aligned to greater than a page cause linker error #70144
Comments
Alignments > 4k are not supported, rust-lang#70022 rust-lang#70144 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
I no longer get a linker error. Instead rustc outright crashes with |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There is an issue here specific to Windows MSVC, that Rust is creating sections with a higher requirement, but not informing the linker of that via It's just that now Rust no longer reaches that linker error due to another related bug, causing a crash in rustc itself... |
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: