Fixed the 32-bit runtime dynamic loader to allocate
authorSean Callanan <scallanan@apple.com>
Thu, 1 Mar 2012 00:15:29 +0000 (00:15 +0000)
committerSean Callanan <scallanan@apple.com>
Thu, 1 Mar 2012 00:15:29 +0000 (00:15 +0000)
code sections when needed.  It just had a conditional
the wrong way around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151777 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp

index 4553ef42df75e51806ff6781ba95113aa625ee63..c11b2c31c3fec7251a73adfe98d5945d69aeb23e 100644 (file)
@@ -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);