This is an archive of the discontinued LLVM Phabricator instance.

LLD: ELF: Simplify CreateELF.
AcceptedPublic

Authored by ruiu on Apr 2 2015, 4:25 PM.

Details

Reviewers
Bigcheese
Summary

CreateELF was a combination of templates and C preprocessor macros.
This patch removes uses of macros.

Previously, we checked alignments based on the host environment.
It doesn't seem to make sense to me because we can use the linker
for cross compilation. So I relaxed the check in this patch.

Diff Detail

Event Timeline

ruiu updated this revision to Diff 23185.Apr 2 2015, 4:25 PM
ruiu retitled this revision from to LLD: ELF: Simplify CreateELF..
ruiu updated this object.
ruiu edited the test plan for this revision. (Show Details)
ruiu added a reviewer: Bigcheese.
ruiu set the repository for this revision to rL LLVM.
ruiu added a project: lld.
ruiu added a subscriber: Unknown Object (MLST).
Bigcheese accepted this revision.Apr 6 2015, 3:36 PM
Bigcheese edited edge metadata.

The alignment check is for the actual file location in memory. It has nothing to do with the target machine, only the machine running lld. However, because of archives, we always have to use an alignment of 2 anyway, so this patch is fine.

This revision is now accepted and ready to land.Apr 6 2015, 3:36 PM