Issue 137043
Summary `lld-link` ignores section alignments greater than `/ALIGN`
Labels new issue
Assignees
Reporter beetrees
    The COFF object format supports section alignments up to 8192, whereas the default value of the `/ALIGN` command line argument (used as the alignment of all sections in the PE output) is 4096. If a section in a COFF object file has an alignment greater than the value of `/ALIGN` (such as in [this Rust example](https://github.com/rust-lang/rust/issues/70144#issuecomment-2825245012)), MSVC `link.exe` will exit with an [LNK1164 linker error](https://learn.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk1164?view=msvc-170), whereas LLVM `lld-link` will ignore it and continue to use the smaller value of `/ALIGN` as the alignment of the sections in the PE output.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to