[llvm] r358833 - [JITLink] Add yet more detail to MachO/x86-64 unsupported relocation errors.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 20 15:59:43 PDT 2019


Author: lhames
Date: Sat Apr 20 15:59:43 2019
New Revision: 358833

URL: http://llvm.org/viewvc/llvm-project?rev=358833&view=rev
Log:
[JITLink] Add yet more detail to MachO/x86-64 unsupported relocation errors.

Knowing the address/symbolnum field values makes it easier to identify the
unsupported relocation, and provides enough information for the full bit
pattern of the relocation to be reconstructed.

Modified:
    llvm/trunk/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp

Modified: llvm/trunk/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp?rev=358833&r1=358832&r2=358833&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp Sat Apr 20 15:59:43 2019
@@ -88,7 +88,10 @@ private:
     }
 
     return make_error<JITLinkError>(
-        "Unsupported x86-64 relocation: kind=" + formatv("{0:x1}", RI.r_type) +
+        "Unsupported x86-64 relocation: address=" +
+        formatv("{0:x8}", RI.r_address) +
+        ", symbolnum=" + formatv("{0:x6}", RI.r_symbolnum) +
+        ", kind=" + formatv("{0:x1}", RI.r_type) +
         ", pc_rel=" + (RI.r_pcrel ? "true" : "false") +
         ", extern= " + (RI.r_extern ? "true" : "false") +
         ", length=" + formatv("{0:d}", RI.r_length));




More information about the llvm-commits mailing list