mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 01:06:06 +00:00
[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
This commit is contained in:
parent
d36bbe9c89
commit
7e9c5610c9
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user