mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
Fix the implementation of MachOObjectFile::isSectionZeroInit so it follows the MachO spec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155976 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
39cc513870
commit
41827f9ba2
@ -598,13 +598,15 @@ error_code MachOObjectFile::isSectionZeroInit(DataRefImpl DRI,
|
||||
if (MachOObj->is64Bit()) {
|
||||
InMemoryStruct<macho::Section64> Sect;
|
||||
getSection64(DRI, Sect);
|
||||
Result = (Sect->Flags & MachO::SectionTypeZeroFill ||
|
||||
Sect->Flags & MachO::SectionTypeZeroFillLarge);
|
||||
unsigned SectionType = Sect->Flags & MachO::SectionFlagMaskSectionType;
|
||||
Result = (SectionType == MachO::SectionTypeZeroFill ||
|
||||
SectionType == MachO::SectionTypeZeroFillLarge);
|
||||
} else {
|
||||
InMemoryStruct<macho::Section> Sect;
|
||||
getSection(DRI, Sect);
|
||||
Result = (Sect->Flags & MachO::SectionTypeZeroFill ||
|
||||
Sect->Flags & MachO::SectionTypeZeroFillLarge);
|
||||
unsigned SectionType = Sect->Flags & MachO::SectionFlagMaskSectionType;
|
||||
Result = (SectionType == MachO::SectionTypeZeroFill ||
|
||||
SectionType == MachO::SectionTypeZeroFillLarge);
|
||||
}
|
||||
|
||||
return object_error::success;
|
||||
|
Loading…
Reference in New Issue
Block a user