[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
This commit is contained in:
Lang Hames 2019-04-20 18:50:13 +00:00
parent bcdce5cd41
commit c283fc5ebb
1 changed files with 5 additions and 1 deletions

View File

@ -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) {