diff options
Diffstat (limited to 'lld/test/ELF/copy-rel-pie-error.s')
| -rw-r--r-- | lld/test/ELF/copy-rel-pie-error.s | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lld/test/ELF/copy-rel-pie-error.s b/lld/test/ELF/copy-rel-pie-error.s new file mode 100644 index 00000000000..131f0c8ef54 --- /dev/null +++ b/lld/test/ELF/copy-rel-pie-error.s @@ -0,0 +1,12 @@ +// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux +// RUN: llvm-mc %p/Inputs/copy-rel-pie.s -o %t2.o -filetype=obj -triple=x86_64-pc-linux +// RUN: ld.lld %t2.o -o %t2.so -shared +// RUN: not ld.lld %t.o %t2.so -o %t.exe -pie 2>&1 | FileCheck %s + +// CHECK: relocation R_X86_64_64 cannot be used when making a shared object; recompile with -fPIC. +// CHECK: relocation R_X86_64_64 cannot be used when making a shared object; recompile with -fPIC. + +.global _start +_start: + .quad bar + .quad foo |

