llvm-project
af45b020 - [LLD][COFF] Align EC code ranges to page boundaries (#168222)

Commit
45 days ago
[LLD][COFF] Align EC code ranges to page boundaries (#168222) We already ensure that code for different architectures is always placed in different pages in `assignAddresses`. We represent those ranges using their first and last chunks. However, the RVAs of those chunks may not be page-aligned, for example, due to extra padding for entry-thunk offsets. Align the chunk RVAs to the page boundary so that the emitted ranges correctly include the entire region. This change affects an existing test that checks corner cases triggered by merging a data section into a code section. We may now include such data in the code range. This differs from MSVC’s behavior, but it should not cause practical issues, and the new behavior is arguably more correct. Fixes #168119.
Author
Parents
Loading