[COFF] Use coff_section::getAlignment

Use LLVM's section alignment calculation instead of having LLD calculate
it.

llvm-svn: 263724
This commit is contained in:
David Majnemer 2016-03-17 16:58:08 +00:00
parent 07f7fe5a4c
commit 93bbc7cd66
1 changed files with 1 additions and 4 deletions

View File

@ -34,10 +34,7 @@ SectionChunk::SectionChunk(ObjectFile *F, const coff_section *H)
// Initialize SectionName.
File->getCOFFObj()->getSectionName(Header, SectionName);
// Bit [20:24] contains section alignment. Both 0 and 1 mean alignment 1.
unsigned Shift = (Header->Characteristics >> 20) & 0xF;
if (Shift > 0)
Align = uint32_t(1) << (Shift - 1);
Align = Header->getAlignment();
// Only COMDAT sections are subject of dead-stripping.
Live = !isCOMDAT();