ppc64-tls-missing-gdld.s
1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# REQUIRES: ppc
# RUN: llvm-mc --triple=powerpc64le %s --filetype=obj -o %t1.o
# RUN: llvm-mc --triple=powerpc64 %s --filetype=obj -o %t2.o
# RUN: not ld.lld --shared %t1.o -o /dev/null 2>&1 | FileCheck %s
# RUN: not ld.lld --shared %t2.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: ld.lld: error: call to __tls_get_addr is missing a R_PPC64_TLSGD/R_PPC64_TLSLD relocation
# CHECK-NEXT: defined in {{.*}}.o
# CHECK-NEXT: referenced by {{.*}}.o:(.text+0x8)
# CHECK: ld.lld: error: call to __tls_get_addr is missing a R_PPC64_TLSGD/R_PPC64_TLSLD relocation
# CHECK-NEXT: defined in {{.*}}.o
# CHECK-NEXT: referenced by {{.*}}.o:(.text+0x18)
# CHECK: ld.lld: error: call to __tls_get_addr is missing a R_PPC64_TLSGD/R_PPC64_TLSLD relocation
# CHECK-NEXT: defined in {{.*}}.o
# CHECK-NEXT: referenced by {{.*}}.o:(.text+0x28)
# CHECK: ld.lld: error: call to __tls_get_addr is missing a R_PPC64_TLSGD/R_PPC64_TLSLD relocation
# CHECK-NEXT: defined in {{.*}}.o
# CHECK-NEXT: referenced by {{.*}}.o:(.text+0x38)
# CHECK: ld.lld: error: call to __tls_get_addr is missing a R_PPC64_TLSGD/R_PPC64_TLSLD relocation
# CHECK-NEXT: defined in {{.*}}.o
# CHECK-NEXT: referenced by {{.*}}.o:(.text+0x40)
GeneralDynamic:
addis 3, 2, x@got@tlsgd@ha
addi 3, 3, x@got@tlsgd@l
bl __tls_get_addr
blr
GeneralDynamic_NOTOC:
addis 3, 2, x@got@tlsgd@ha
addi 3, 3, x@got@tlsgd@l
bl __tls_get_addr@notoc
blr
LocalDynamic:
addis 3, 2, x@got@tlsld@ha
addi 3, 3, x@got@tlsld@l
bl __tls_get_addr
blr
LocalDynamic_NOTOC:
addis 3, 2, x@got@tlsld@ha
addi 3, 3, x@got@tlsld@l
bl __tls_get_addr@notoc
blr
CallOnly:
bl __tls_get_addr
blr