[lld/mac] Fix alignment on subsections
authorNico Weber <thakis@chromium.org>
Sun, 9 May 2021 22:35:16 +0000 (18:35 -0400)
committerNico Weber <thakis@chromium.org>
Mon, 10 May 2021 01:00:56 +0000 (21:00 -0400)
commit7f673fcaa9a2cb4600f244792f8521ff19aa806c
treea2cbe6379ab488e2ae5fa679651f44f091217ea8
parent0f8854f7f5d3e98f32eef7cfd09d5b8915a7d301
[lld/mac] Fix alignment on subsections

On a section with alignment of 16, subsections aligned to 16-byte
boundaries should keep their 16-byte alignment.

Fixes PR50274. (The same bug could have happened with -order_file
previously.)

Differential Revision: https://reviews.llvm.org/D102139
lld/MachO/InputFiles.cpp
lld/test/MachO/weak-definition-gc.s