This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Change std::max<uint64_t> to uint32_t for section alignment
ClosedPublic

Authored by MaskRay on Apr 25 2019, 8:25 PM.

Details

Summary

We use uint32_t SectionBase::Alignment and `uint32_t
PhdrEntry::p_align` despite alignments being 64 bits in ELF64.
Fix the std::max template arguments accordingly.

The currently 160-byte InputSection will become 168 bytes if we make SectionBase::Alignment uint64_t.

Event Timeline

MaskRay created this revision.Apr 25 2019, 8:25 PM
ruiu accepted this revision.Apr 25 2019, 8:28 PM

LGTM

This revision is now accepted and ready to land.Apr 25 2019, 8:28 PM
This revision was automatically updated to reflect the committed changes.