Consistently check 'IsCode' when allocating sections in RuntimeDyld (via
[oota-llvm.git] / lib / ExecutionEngine / RuntimeDyld / RuntimeDyldMachO.cpp
index 0408337fff73ce57f706d96977f68cc1f3f28f00..be80cbcfda75fcb7ccb538020151c577380a343e 100644 (file)
@@ -378,7 +378,9 @@ void RuntimeDyldMachO::processRelocationRef(unsigned SectionID,
     }
   } else {
     SectionRef Sec = MachO->getRelocationSection(RE);
-    Value.SectionID = findOrEmitSection(Obj, Sec, true, ObjSectionToID);
+    bool IsCode = false;
+    Sec.isText(IsCode);
+    Value.SectionID = findOrEmitSection(Obj, Sec, IsCode, ObjSectionToID);
     uint64_t Addr;
     Sec.getAddress(Addr);
     Value.Addend = Addend - Addr;