1 // RUN
: llvm-mc
-triple
=powerpc64-pc-linux
-filetype
=obj
%s
-o
- | \
2 // RUN
: llvm-readobj
-r | FileCheck
%s
4 // Test correct relocation generation for thread-local storage using
5 // the local dynamic model.
7 .file "/home/espindola/llvm/llvm/test/CodeGen/PowerPC/tls-ld-obj.ll"
12 .section .opd,"aw",@progbits
21 addis 3, 2, a@got@tlsld@ha
22 addi 3, 3, a@got@tlsld@
l
24 bl __tls_get_addr
(a@tlsld
)
27 addis 3, 3, a@dtprel@ha
35 .size main, .Ltmp0-.L.main
39 .section .tbss,"awT",@nobits
47 // Verify generation of R_PPC64_GOT_TLSLD16_HA
, R_PPC64_GOT_TLSLD16_LO
,
48 // R_PPC64_TLSLD
, R_PPC64_DTPREL16_HA
, and R_PPC64_DTPREL16_LO for
49 // accessing external variable
a, and R_PPC64_REL24 for the call to
52 // CHECK
: Relocations
[
53 // CHECK
: Section
{{.*}} .rela.text {
54 // CHECK
: 0x
{{[0-9,A-F
]+}} R_PPC64_GOT_TLSLD16_HA
a
55 // CHECK
: 0x
{{[0-9,A-F
]+}} R_PPC64_GOT_TLSLD16_LO
a
56 // CHECK
: 0x
{{[0-9,A-F
]+}} R_PPC64_TLSLD
a
57 // CHECK
: 0x
{{[0-9,A-F
]+}} R_PPC64_REL24 __tls_get_addr
58 // CHECK
: 0x
{{[0-9,A-F
]+}} R_PPC64_DTPREL16_HA
a
59 // CHECK
: 0x
{{[0-9,A-F
]+}} R_PPC64_DTPREL16_LO
a