]> granicus.if.org Git - llvm/commitdiff
[JITLink] Add yet more detail to MachO/x86-64 unsupported relocation errors.
authorLang Hames <lhames@gmail.com>
Sat, 20 Apr 2019 22:59:43 +0000 (22:59 +0000)
committerLang Hames <lhames@gmail.com>
Sat, 20 Apr 2019 22:59:43 +0000 (22:59 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358833 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/JITLink/JITLink_MachO_x86_64.cpp

index 857885bee105f5a61aefac77d769b08309186a4d..50bbe4b0c75aea08fa940621104cfc7bc660638c 100644 (file)
@@ -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));