[COFF] Refactor section alignment calculation
Section alignment isn't completely trivial, let it live in one place so that we may reuse it in LLVM. llvm-svn: 263722
This commit is contained in:
@@ -290,7 +290,7 @@ std::error_code COFFObjectFile::getSectionContents(DataRefImpl Ref,
|
||||
|
||||
uint64_t COFFObjectFile::getSectionAlignment(DataRefImpl Ref) const {
|
||||
const coff_section *Sec = toSec(Ref);
|
||||
return uint64_t(1) << (((Sec->Characteristics & 0x00F00000) >> 20) - 1);
|
||||
return Sec->getAlignment();
|
||||
}
|
||||
|
||||
bool COFFObjectFile::isSectionText(DataRefImpl Ref) const {
|
||||
|
||||
Reference in New Issue
Block a user