Fixed the 32-bit runtime dynamic loader to allocate

code sections when needed.  It just had a conditional
the wrong way around.

llvm-svn: 151777
This commit is contained in:
Sean Callanan 2012-03-01 00:15:29 +00:00
parent 16bdd01e87
commit 171b2ddfbd

View 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);