diff options
| -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: |

