[llvm-commits] [llvm] r163764 - /llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp

Jim Grosbach grosbach at apple.com
Wed Sep 12 18:24:35 PDT 2012


Author: grosbach
Date: Wed Sep 12 20:24:35 2012
New Revision: 163764

URL: http://llvm.org/viewvc/llvm-project?rev=163764&view=rev
Log:
MCJIT: Make sure to mask off non-type-field bits.

When comparing to the macho relocation type enum value, make sure we're only
comparing against the bits in the RelType that correspond.

Modified:
    llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp

Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp?rev=163764&r1=163763&r2=163764&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp Wed Sep 12 20:24:35 2012
@@ -254,7 +254,7 @@
     }
   }
 
-  if (Arch == Triple::arm && RelType == macho::RIT_ARM_Branch24Bit) {
+  if (Arch == Triple::arm && (RelType & 0xf) == macho::RIT_ARM_Branch24Bit) {
     // This is an ARM branch relocation, need to use a stub function.
 
     //  Look up for existing stub.





More information about the llvm-commits mailing list