[PATCH] D29282: [ELF] - Report filename for unknown relocation error.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 07:49:12 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL293640: [ELF] - Report filename for unknown relocation error. (authored by grimar).

Changed prior to commit:
  https://reviews.llvm.org/D29282?vs=86429&id=86436#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D29282

Files:
  lld/trunk/ELF/Target.cpp
  lld/trunk/test/ELF/invalid/invalid-relocation-x64.test


Index: lld/trunk/test/ELF/invalid/invalid-relocation-x64.test
===================================================================
--- lld/trunk/test/ELF/invalid/invalid-relocation-x64.test
+++ lld/trunk/test/ELF/invalid/invalid-relocation-x64.test
@@ -26,5 +26,5 @@
         Type:            R_X86_64_NONE
 
 # RUN: not ld.lld %p/Inputs/invalid-relocation-x64.elf -o %t2 2>&1 | FileCheck %s
-# CHECK: unknown relocation type: Unknown (152)
-# CHECK: unknown relocation type: Unknown (153)
+# CHECK: {{.*}}invalid-relocation-x64.elf: unknown relocation type: Unknown (152)
+# CHECK: {{.*}}invalid-relocation-x64.elf: unknown relocation type: Unknown (153)
Index: lld/trunk/ELF/Target.cpp
===================================================================
--- lld/trunk/ELF/Target.cpp
+++ lld/trunk/ELF/Target.cpp
@@ -393,7 +393,7 @@
   case R_386_NONE:
     return R_HINT;
   default:
-    error("unknown relocation type: " + toString(Type));
+    error(toString(S.File) + ": unknown relocation type: " + toString(Type));
     return R_HINT;
   }
 }
@@ -674,7 +674,7 @@
   case R_X86_64_NONE:
     return R_HINT;
   default:
-    error("unknown relocation type: " + toString(Type));
+    error(toString(S.File) + ": unknown relocation type: " + toString(Type));
     return R_HINT;
   }
 }
@@ -1627,7 +1627,7 @@
   case R_AMDGPU_GOTPCREL32_HI:
     return R_GOT_PC;
   default:
-    error("unknown relocation type: " + toString(Type));
+    error(toString(S.File) + ": unknown relocation type: " + toString(Type));
     return R_HINT;
   }
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29282.86436.patch
Type: text/x-patch
Size: 1543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170131/3c7b3647/attachment.bin>


More information about the llvm-commits mailing list