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

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 20 11:50:13 PDT 2019


Author: lhames
Date: Sat Apr 20 11:50:13 2019
New Revision: 358826

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

The extra information here will be helpful in diagnosing errors, like the
ones currently occuring on the PPC big-endian bots. :)

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=358826&r1=358825&r2=358826&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 11:50:13 2019
@@ -87,7 +87,11 @@ private:
       break;
     }
 
-    return make_error<JITLinkError>("Unsupported x86-64 relocation kind");
+    return make_error<JITLinkError>(
+        "Unsupported x86-64 relocation: kind=" + formatv("{0:x1}", RI.r_type) +
+        ", pc_rel=" + (RI.r_pcrel ? "true" : "false") +
+        ", extern= " + (RI.r_extern ? "true" : "false") +
+        ", length=" + formatv("{0:u}", RI.r_length));
   }
 
   Expected<Atom &> findAtomBySymbolIndex(const MachO::relocation_info &RI) {




More information about the llvm-commits mailing list