Don't deference the section_end() iterator.
[oota-llvm.git] / lib / ExecutionEngine / RuntimeDyld / RuntimeDyld.cpp
index fb53ba96055cdc1d7757a36f792e094aab5b7935..54f1a1c0cc2d35aef3da97ead73871bb1390f993 100644 (file)
@@ -214,6 +214,9 @@ RuntimeDyldImpl::loadObjectImpl(const object::ObjectFile &Obj) {
     StubMap Stubs;
     section_iterator RelocatedSection = SI->getRelocatedSection();
 
+    if (RelocatedSection == SE)
+      continue;
+
     relocation_iterator I = SI->relocation_begin();
     relocation_iterator E = SI->relocation_end();