File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
llvm/lib/ExecutionEngine/JITLink Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,17 @@ static Error optimizeELF_x86_64_GOTAndStubs(LinkGraph &G) {
221
221
return Error::success ();
222
222
}
223
223
224
+ static const char *getELFX86_64RelocName (uint32_t Type) {
225
+ switch (Type) {
226
+ #define ELF_RELOC (Name, Number ) \
227
+ case Number: \
228
+ return #Name;
229
+ #include " llvm/BinaryFormat/ELFRelocs/x86_64.def"
230
+ #undef ELF_RELOC
231
+ }
232
+ return " Unrecognized ELF/x86-64 relocation type" ;
233
+ }
234
+
224
235
namespace llvm {
225
236
namespace jitlink {
226
237
@@ -252,8 +263,9 @@ class ELFLinkGraphBuilder_x86_64 : public ELFLinkGraphBuilder<object::ELF64LE> {
252
263
case ELF::R_X86_64_PLT32:
253
264
return ELF_x86_64_Edges::ELFX86RelocationKind::Branch32;
254
265
}
255
- return make_error<JITLinkError>(" Unsupported x86-64 relocation:" +
256
- formatv (" {0:d}" , Type));
266
+ return make_error<JITLinkError>(" Unsupported x86-64 relocation type " +
267
+ formatv (" {0:d}: " , Type) +
268
+ getELFX86_64RelocName (Type));
257
269
}
258
270
259
271
Error addRelocations () override {
You can’t perform that action at this time.
0 commit comments