[llvm-commits] [PATCH][MCJIT] Fixing problems with 64_32 relocations in RuntimeDyldELF

Kaylor, Andrew andrew.kaylor at intel.com
Thu Jul 26 11:42:29 PDT 2012


The attached patch fixes a couple of problems in the handling of 32-bit relocations in 64-bit code in the RuntimeDyldELF class.  In the first case, the assertion in the handler didn't allow for the case of a positive 32-bit value with a R_X86_64_32S relocation.  In addition to correcting that problem, I used named constants to make the code more readable here.  In the second case, the magic values that were being used to check for a valid 32-bit value were missing a digit.  I replaced them with named constants.  I modified the code in both of these locations to use llvm_unreachable for the unexpected cases rather than assert, as this seems to be more consistent with LLVM coding practices.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120726/ee70ebe5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x86-64-32-relocation.patch
Type: application/octet-stream
Size: 1446 bytes
Desc: x86-64-32-relocation.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120726/ee70ebe5/attachment.obj>


More information about the llvm-commits mailing list