Skip to content

lld-link ignores section alignments greater than /ALIGN #137043

Open
@beetrees

Description

@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), MSVC link.exe will exit with an LNK1164 linker error, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions