From: Lang Hames Date: Sat, 20 Apr 2019 18:50:13 +0000 (+0000) Subject: [JITLink] Add more detail to MachO/x86-64 "unsupported relocation" errors. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c9552016070fb23237a4dc840e2273f821d0aff;p=llvm [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. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358826 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp b/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp index 0e1dd236dc8..6ee633baca4 100644 --- a/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp +++ b/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp @@ -87,7 +87,11 @@ private: break; } - return make_error("Unsupported x86-64 relocation kind"); + return make_error( + "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 findAtomBySymbolIndex(const MachO::relocation_info &RI) {