[RuntimeDyldELF] Fix missing cases in Placeholder processing
authorKeno Fischer <kfischer@college.harvard.edu>
Thu, 16 Apr 2015 02:00:38 +0000 (02:00 +0000)
committerKeno Fischer <kfischer@college.harvard.edu>
Thu, 16 Apr 2015 02:00:38 +0000 (02:00 +0000)
Try to appease the build bots. We should write rtdyld test cases for these
to make them testible on other platforms.

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

lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp

index d380cb4e18b89c68488eba603d0b481cfa7df5ae..52db2c0f62a89ca6a55cbae2143aabb7076f932c 100644 (file)
@@ -460,7 +460,7 @@ void RuntimeDyldELF::resolveARMRelocation(const SectionEntry &Section,
     else if (Type == ELF::R_ARM_MOVT_ABS)
       Value = (Value >> 16) & 0xFFFF;
     *TargetPtr &= ~0x000F0FFF;
-    *TargetPtr = Value & 0xFFF;
+    *TargetPtr |= Value & 0xFFF;
     *TargetPtr |= ((Value >> 12) & 0xF) << 16;
     break;
     // Write 24 bit relative value to the branch instruction.
@@ -1052,6 +1052,8 @@ relocation_iterator RuntimeDyldELF::processRelocationRef(
         Value.Addend += ((*Placeholder) & 0x0000ffff) << 16;
       else if (RelType == ELF::R_MIPS_LO16)
         Value.Addend += ((*Placeholder) & 0x0000ffff);
+      else if (RelType == ELF::R_MIPS_32)
+        Value.Addend += *Placeholder;
       processSimpleRelocation(SectionID, Offset, RelType, Value);
     }
   } else if (Arch == Triple::ppc64 || Arch == Triple::ppc64le) {