diff options
author | George Rimar <grimar@accesssoftek.com> | 2017-10-10 07:55:07 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2017-10-10 07:55:07 +0000 |
commit | 7e9c5610c9becc4bb0d93f8fc34e0716078c99a2 (patch) | |
tree | 09676306ed88105e3f0f2bfd99b53cdd257c9c03 | |
parent | d36bbe9c892e533b90716f1852ef036a94fddbf6 (diff) | |
download | bcm5719-llvm-7e9c5610c9becc4bb0d93f8fc34e0716078c99a2.tar.gz bcm5719-llvm-7e9c5610c9becc4bb0d93f8fc34e0716078c99a2.zip |
[ELF] - Improve "has non-ABS reloc" error.
It did not contain information about relocation type and symbol.
Differential revision: https://reviews.llvm.org/D38623
llvm-svn: 315280
-rw-r--r-- | lld/ELF/InputSection.cpp | 3 | ||||
-rw-r--r-- | lld/test/ELF/non-abs-reloc.s | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index d71019c1bf8..2b883d5886a 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -685,7 +685,8 @@ void InputSection::relocateNonAlloc(uint8_t *Buf, ArrayRef<RelTy> Rels) { 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; } diff --git a/lld/test/ELF/non-abs-reloc.s b/lld/test/ELF/non-abs-reloc.s index ef9ba446613..454104cca07 100644 --- a/lld/test/ELF/non-abs-reloc.s +++ b/lld/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: |