[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:
George Rimar 2016-06-11 15:59:09 +00:00
parent 5b9bade8dd
commit 2993ad2248
9 changed files with 9 additions and 9 deletions

View File

@ -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 {

View File

@ -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

View File

@ -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 - .

View File

@ -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 - .

View File

@ -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 - .

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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