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

Danil Malyshev dmalyshev at accesssoftek.com
Thu Jul 26 13:52:29 PDT 2012


Hi Andrew,


It looks good, thank you.


Regards,
Danil

________________________________
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Kaylor, Andrew
Sent: Thursday, July 26, 2012 10:42 PM
To: llvm-commits at cs.uiuc.edu
Subject: [llvm-commits] [PATCH][MCJIT] Fixing problems with 64_32 relocations in RuntimeDyldELF

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/f1f06598/attachment.html>


More information about the llvm-commits mailing list