diff options
Diffstat (limited to 'test/ELF/copy-rel-pie-error.s')
-rw-r--r-- | test/ELF/copy-rel-pie-error.s | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ELF/copy-rel-pie-error.s b/test/ELF/copy-rel-pie-error.s new file mode 100644 index 000000000000..1f427023baa5 --- /dev/null +++ b/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: can't create dynamic relocation R_X86_64_64 against readonly segment +// CHECK: can't create dynamic relocation R_X86_64_64 against readonly segment + +.global _start +_start: + .quad bar + .quad foo |