aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
index 4553ef42df..c11b2c31c3 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
@@ -150,7 +150,7 @@ loadSegment32(const MachOObject *Obj,
// Allocate memory via the MM for the section.
uint8_t *Buffer;
uint32_t SectionID = Sections.size();
- if (Sect->Flags != 0x80000400)
+ if (Sect->Flags == 0x80000400)
Buffer = MemMgr->allocateCodeSection(Sect->Size, Sect->Align, SectionID);
else
Buffer = MemMgr->allocateDataSection(Sect->Size, Sect->Align, SectionID);