[PATCH] D38623: [ELF] - Improve "has non-ABS reloc" error.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 00:55:18 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL315280: [ELF] - Improve "has non-ABS reloc" error. (authored by grimar).

Changed prior to commit:
  https://reviews.llvm.org/D38623?vs=117987&id=118324#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D38623

Files:
  lld/trunk/ELF/InputSection.cpp
  lld/trunk/test/ELF/non-abs-reloc.s


Index: lld/trunk/ELF/InputSection.cpp
===================================================================
--- lld/trunk/ELF/InputSection.cpp
+++ lld/trunk/ELF/InputSection.cpp
@@ -685,7 +685,8 @@
     if (Expr == R_NONE)
       continue;
     if (Expr != R_ABS) {
-      error(this->getLocation<ELFT>(Offset) + ": has non-ABS reloc");
+      error(this->getLocation<ELFT>(Offset) + ": has non-ABS relocation " +
+            toString(Type) + " against symbol '" + toString(Sym) + "'");
       return;
     }
 
Index: lld/trunk/test/ELF/non-abs-reloc.s
===================================================================
--- lld/trunk/test/ELF/non-abs-reloc.s
+++ lld/trunk/test/ELF/non-abs-reloc.s
@@ -1,7 +1,7 @@
 // REQUIRES: x86
 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
 // RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
-// CHECK: {{.*}}:(.dummy+0x0): has non-ABS reloc
+// CHECK: {{.*}}:(.dummy+0x0): has non-ABS relocation R_X86_64_GOTPCREL against symbol 'foo'
 
 .globl _start
 _start:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38623.118324.patch
Type: text/x-patch
Size: 1030 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171010/072e4b62/attachment.bin>


More information about the llvm-commits mailing list