forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the error message format for an incompatible relocation.
Previous error message style: error: /home/alice/src/bar.c:12: relocation R_X86_64_PLT32 cannot refer to absolute symbol 'answer' defined in /home/alice/src/foo.o New error message style: error: relocation R_X86_64_PLT32 cannot refer to absolute symbol: foo >>> defined in /home/alice/src/foo.o >>> referenced by bar.c:12 (/home/alice/src/bar.c:12) >>> /home/alice/src/bar.o:(.text+0x1) llvm-svn: 299390
- Loading branch information
Showing
22 changed files
with
107 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
// 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: {{.*}}:(.data+0x0): relocation R_AARCH64_ABS16 cannot be used against shared object; recompile with -fPIC. | ||
// CHECK: relocation R_AARCH64_ABS16 cannot be used against shared object; recompile with -fPIC | ||
// CHECK-NEXT: >>> defined in {{.*}}.o | ||
// CHECK-NEXT: >>> referenced by {{.*}}.o:(.data+0x0) | ||
|
||
.data | ||
.hword foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
// 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: {{.*}}:(.data+0x0): relocation R_AARCH64_PREL16 cannot be used against shared object; recompile with -fPIC. | ||
// CHECK: R_AARCH64_PREL16 cannot be used against shared object; recompile with -fPIC | ||
// CHECK: >>> defined in {{.*}} | ||
// CHECK: >>> referenced by {{.*}}:(.data+0x0) | ||
|
||
.data | ||
.hword foo - . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
// 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: {{.*}}:(.data+0x0): relocation R_AARCH64_PREL32 cannot be used against shared object; recompile with -fPIC. | ||
// CHECK: relocation R_AARCH64_PREL32 cannot be used against shared object; recompile with -fPIC | ||
// CHECK: >>> defined in {{.*}} | ||
// CHECK: >>> referenced by {{.*}}:(.data+0x0) | ||
|
||
.data | ||
.word foo - . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
// 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: {{.*}}:(.data+0x0): relocation R_AARCH64_PREL64 cannot be used against shared object; recompile with -fPIC. | ||
// CHECK: relocation R_AARCH64_PREL64 cannot be used against shared object; recompile with -fPIC | ||
// CHECK: >>> defined in {{.*}} | ||
// CHECK: >>> referenced by {{.*}}:(.data+0x0) | ||
|
||
.data | ||
.xword foo - . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
# 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: {{.*}}:(.data+0x0): relocation R_X86_64_32 cannot be used against shared object; recompile with -fPIC. | ||
|
||
# CHECK: relocation R_X86_64_32 cannot be used against shared object; recompile with -fPIC | ||
# CHECK: >>> defined in {{.*}} | ||
# CHECK: >>> referenced by {{.*}}:(.data+0x0) | ||
|
||
.data | ||
.long _shared |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
# 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: {{.*}}:(.data+0x1): relocation R_X86_64_PC32 cannot be used against shared object; recompile with -fPIC. | ||
|
||
# CHECK: relocation R_X86_64_PC32 cannot be used against shared object; recompile with -fPIC | ||
# CHECK: >>> defined in {{.*}} | ||
# CHECK: >>> referenced by {{.*}}:(.data+0x1) | ||
|
||
.data | ||
call _shared |