mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +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()) {
|
if (MachOObj->is64Bit()) {
|
||||||
InMemoryStruct<macho::Section64> Sect;
|
InMemoryStruct<macho::Section64> Sect;
|
||||||
getSection64(DRI, Sect);
|
getSection64(DRI, Sect);
|
||||||
Result = (Sect->Flags & MachO::SectionTypeZeroFill ||
|
unsigned SectionType = Sect->Flags & MachO::SectionFlagMaskSectionType;
|
||||||
Sect->Flags & MachO::SectionTypeZeroFillLarge);
|
Result = (SectionType == MachO::SectionTypeZeroFill ||
|
||||||
|
SectionType == MachO::SectionTypeZeroFillLarge);
|
||||||
} else {
|
} else {
|
||||||
InMemoryStruct<macho::Section> Sect;
|
InMemoryStruct<macho::Section> Sect;
|
||||||
getSection(DRI, Sect);
|
getSection(DRI, Sect);
|
||||||
Result = (Sect->Flags & MachO::SectionTypeZeroFill ||
|
unsigned SectionType = Sect->Flags & MachO::SectionFlagMaskSectionType;
|
||||||
Sect->Flags & MachO::SectionTypeZeroFillLarge);
|
Result = (SectionType == MachO::SectionTypeZeroFill ||
|
||||||
|
SectionType == MachO::SectionTypeZeroFillLarge);
|
||||||
}
|
}
|
||||||
|
|
||||||
return object_error::success;
|
return object_error::success;
|
||||||
|
Loading…
Reference in New Issue
Block a user