forked from OSchip/llvm-project
[ELF] - Change wording of error message.
Previously message told us that relocations could not be used when making shared object. That was correct because message could appear (and it is expected) when we linked executable. Message should have being changed to something that says we can't use a subset of relocations against shared symbols. Patch fixes the text. llvm-svn: 272478
This commit is contained in:
parent
5b9bade8dd
commit
2993ad2248
|
@ -77,7 +77,7 @@ template <unsigned N> static void checkAlignment(uint64_t V, uint32_t Type) {
|
|||
|
||||
static void errorDynRel(uint32_t Type) {
|
||||
error("relocation " + getRelName(Type) +
|
||||
" cannot be used when making a shared object; recompile with -fPIC.");
|
||||
" cannot be used against shared object; recompile with -fPIC.");
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// REQUIRES: aarch64
|
||||
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
|
||||
// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
|
||||
// CHECK: relocation R_AARCH64_ABS16 cannot be used when making a shared object; recompile with -fPIC.
|
||||
// CHECK: relocation R_AARCH64_ABS16 cannot be used against shared object; recompile with -fPIC.
|
||||
|
||||
.data
|
||||
.hword foo
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// REQUIRES: aarch64
|
||||
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
|
||||
// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
|
||||
// CHECK: relocation R_AARCH64_PREL16 cannot be used when making a shared object; recompile with -fPIC.
|
||||
// CHECK: relocation R_AARCH64_PREL16 cannot be used against shared object; recompile with -fPIC.
|
||||
|
||||
.data
|
||||
.hword foo - .
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// REQUIRES: aarch64
|
||||
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
|
||||
// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
|
||||
// CHECK: relocation R_AARCH64_PREL32 cannot be used when making a shared object; recompile with -fPIC.
|
||||
// CHECK: relocation R_AARCH64_PREL32 cannot be used against shared object; recompile with -fPIC.
|
||||
|
||||
.data
|
||||
.word foo - .
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// REQUIRES: aarch64
|
||||
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
|
||||
// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
|
||||
// CHECK: relocation R_AARCH64_PREL64 cannot be used when making a shared object; recompile with -fPIC.
|
||||
// CHECK: relocation R_AARCH64_PREL64 cannot be used against shared object; recompile with -fPIC.
|
||||
|
||||
.data
|
||||
.xword foo - .
|
||||
|
|
|
@ -9,4 +9,4 @@ _start:
|
|||
.data
|
||||
.long bar
|
||||
|
||||
// CHECK: R_X86_64_32 cannot be used when making a shared object; recompile with -fPIC.
|
||||
// CHECK: R_X86_64_32 cannot be used against shared object; recompile with -fPIC.
|
||||
|
|
|
@ -9,4 +9,4 @@ _start:
|
|||
.data
|
||||
.long bar - .
|
||||
|
||||
// CHECK: R_X86_64_PC32 cannot be used when making a shared object; recompile with -fPIC.
|
||||
// CHECK: R_X86_64_PC32 cannot be used against shared object; recompile with -fPIC.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
||||
# RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
|
||||
# CHECK: relocation R_X86_64_32 cannot be used when making a shared object; recompile with -fPIC.
|
||||
# CHECK: relocation R_X86_64_32 cannot be used against shared object; recompile with -fPIC.
|
||||
|
||||
.data
|
||||
.long _shared
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
||||
# RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
|
||||
# CHECK: relocation R_X86_64_PC32 cannot be used when making a shared object; recompile with -fPIC.
|
||||
# CHECK: relocation R_X86_64_PC32 cannot be used against shared object; recompile with -fPIC.
|
||||
|
||||
.data
|
||||
call _shared
|
||||
|
|
Loading…
Reference in New Issue