aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/relocation-nocopy.s
blob: 533277dc8ec367fe27b67251a3aad995f5bfbef5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/relocation-copy.s -o %t2.o
// RUN: ld.lld -shared %t2.o -o %t.so
// RUN: not ld.lld -z nocopyreloc %t.o %t.so -o %t3 2>&1 | FileCheck %s

// CHECK: unresolvable relocation R_X86_64_32S against symbol 'x'
// CHECK: unresolvable relocation R_X86_64_32S against symbol 'y'
// CHECK: unresolvable relocation R_X86_64_32S against symbol 'z'

.text
.global _start
_start:
movl $5, x
movl $7, y
movl $9, z
movl $x, %edx
movl $y, %edx
movl $z, %edx