mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Object: add getSectionAlignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141581 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -336,6 +336,15 @@ error_code COFFObjectFile::getSectionContents(DataRefImpl Sec,
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
error_code COFFObjectFile::getSectionAlignment(DataRefImpl Sec,
|
||||
uint64_t &Res) const {
|
||||
const coff_section *sec = toSec(Sec);
|
||||
if (!sec)
|
||||
return object_error::parse_failed;
|
||||
Res = uint64_t(1) << (((sec->Characteristics & 0x00F00000) >> 20) - 1);
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
error_code COFFObjectFile::isSectionText(DataRefImpl Sec,
|
||||
bool &Result) const {
|
||||
const coff_section *sec = toSec(Sec);
|
||||
|
Reference in New Issue
Block a user