From c283fc5ebb8989e128d3e2b7e29affd7d6c27b96 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Sat, 20 Apr 2019 18:50:13 +0000 Subject: [PATCH] [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. :) llvm-svn: 358826 --- llvm/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp b/llvm/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp index 0e1dd236dc8e..6ee633baca4c 100644 --- a/llvm/lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp +++ b/llvm/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) {