This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Align all cstrings to 16 bytes when deduplicating
ClosedPublic

Authored by int3 on Jun 23 2021, 8:14 PM.

Details

Summary

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.

Diff Detail

Event Timeline

int3 created this revision.Jun 23 2021, 8:14 PM
Herald added a project: Restricted Project. · View Herald Transcript
int3 requested review of this revision.Jun 23 2021, 8:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2021, 8:14 PM
thakis accepted this revision.Jun 24 2021, 5:33 AM
thakis added a subscriber: thakis.

Definitely lg as a temporary fix :)

This revision is now accepted and ready to land.Jun 24 2021, 5:33 AM