[llvm] r235070 - [RuntimeDyldELF] Fix missing cases in Placeholder processing
Keno Fischer
kfischer at college.harvard.edu
Wed Apr 15 19:00:38 PDT 2015
Author: kfischer
Date: Wed Apr 15 21:00:38 2015
New Revision: 235070
URL: http://llvm.org/viewvc/llvm-project?rev=235070&view=rev
Log:
[RuntimeDyldELF] Fix missing cases in Placeholder processing
Try to appease the build bots. We should write rtdyld test cases for these
to make them testible on other platforms.
Modified:
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp?rev=235070&r1=235069&r2=235070&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp Wed Apr 15 21:00:38 2015
@@ -460,7 +460,7 @@ void RuntimeDyldELF::resolveARMRelocatio
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::proc
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) {
More information about the llvm-commits
mailing list