mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
Fix the implementation of MachOObjectFile::isSectionZeroInit so it follows the MachO spec.
llvm-svn: 155976
This commit is contained in:
parent
1e9562afb1
commit
101c4055c5
@ -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