[lld-macho] Align all cstrings to 16 bytes when deduplicating
authorJez Ng <jezng@fb.com>
Thu, 24 Jun 2021 20:22:49 +0000 (16:22 -0400)
committerJez Ng <jezng@fb.com>
Thu, 24 Jun 2021 20:53:29 +0000 (16:53 -0400)
commit4a8503c8e04a5252193d58bb57a0111e7df05104
tree672eae7f254146ff48cf6c30a483fcc916a5bc9e
parente2d4b02404af13a600f27b67cad86682fd298efa
[lld-macho] Align all cstrings to 16 bytes when deduplicating

We previously did this only for x86_64, but it turns out that
arm64 needs this too -- see PR50791.

Ultimately this is a hack, and we should avoid over-aligning strings
that don't need it. I'm just having a hard time figuring out how ld64 is
determining the right alignment.

No new test for this since we were already testing this behavior for
x86_64, and extending it to arm64 seems too trivial.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D104835
lld/MachO/SyntheticSections.cpp