This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [COFF] Set proper pointer size alignment for LocalImportChunk
ClosedPublic

Authored by mstorsjo on Oct 11 2018, 12:45 AM.

Details

Summary

When these are accessed with load/store instructions on ARM64, it becomes strictly necessary to have them properly aligned.

This fixes PR39228.

This is, IMO, a good candidate for backporting to the 7.0.1 branch.

Diff Detail

Event Timeline

mstorsjo created this revision.Oct 11 2018, 12:45 AM
ruiu accepted this revision.Oct 11 2018, 8:23 AM

LGTM

COFF/Chunks.h
372

I'd write Alignment = Config->Is64 ? 8 : 4; instead of getSize() because it can be understood without reading getSize(). (I wondered whether or not getSize() returns a large value such as 16 when I read this code for the first time.)

This revision is now accepted and ready to land.Oct 11 2018, 8:23 AM
This revision was automatically updated to reflect the committed changes.