xref: /llvm-project/lld/test/ELF/relocation-nocopy.s (revision cf783be8d7a8594ab82f8215671dddbebcae39ec)
1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/relocation-copy.s -o %t2.o
4// RUN: ld.lld -shared %t2.o -o %t.so
5// RUN: not ld.lld -z nocopyreloc %t.o %t.so -o /dev/null 2>&1 | FileCheck %s
6
7// CHECK: unresolvable relocation R_X86_64_32S against symbol 'x'
8// CHECK: unresolvable relocation R_X86_64_32S against symbol 'y'
9// CHECK: unresolvable relocation R_X86_64_32S against symbol 'z'
10// CHECK: unresolvable relocation R_X86_64_32 against symbol 'x'
11// CHECK: unresolvable relocation R_X86_64_32 against symbol 'y'
12// CHECK: unresolvable relocation R_X86_64_32 against symbol 'z'
13
14.text
15.global _start
16_start:
17movl $5, x
18movl $7, y
19movl $9, z
20movl $x, %edx
21movl $y, %edx
22movl $z, %edx
23