Update RuntimeDyldELF::findOPDEntrySection the new relocation iterators.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 3 Jun 2013 19:37:34 +0000 (19:37 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 3 Jun 2013 19:37:34 +0000 (19:37 +0000)
This was missing from r182908. I didn't noticed it at the time because the MCJIT tests were
disabled when building with cmake on ppc64 (which I fixed in r183143).

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

lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp

index c5eed251f915b5221c8d3a2de1b0f7b13984de23..ee424db6afff18bbc722822cf6198a4913b69f5e 100644 (file)
@@ -529,9 +529,13 @@ void RuntimeDyldELF::findOPDEntrySection(ObjectImage &Obj,
   error_code err;
   for (section_iterator si = Obj.begin_sections(),
      se = Obj.end_sections(); si != se; si.increment(err)) {
-    StringRef SectionName;
-    check(si->getName(SectionName));
-    if (SectionName != ".opd")
+    section_iterator RelSecI = si->getRelocatedSection();
+    if (RelSecI == Obj.end_sections())
+      continue;
+
+    StringRef RelSectionName;
+    check(RelSecI->getName(RelSectionName));
+    if (RelSectionName != ".opd")
       continue;
 
     for (relocation_iterator i = si->begin_relocations(),