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 general dynamic model and integrated assembly.
8 .file "/home/espindola/llvm/llvm/test/CodeGen/PowerPC/tls-gd-obj.ll"
13 .section .opd,"aw",@progbits
22 addis 3, 2, a@got@tlsgd@ha
23 addi 3, 3, a@got@tlsgd@l
25 bl __tls_get_addr(a@tlsgd)
34 .size main, .Ltmp0-.L.main
37 .section .tbss,"awT",@nobits
45 // Verify generation of R_PPC64_GOT_TLSGD16_HA, R_PPC64_GOT_TLSGD16_LO,
46 // and R_PPC64_TLSGD for accessing external variable a, and R_PPC64_REL24
47 // for the call to __tls_get_addr.
49 // CHECK: Relocations [
50 // CHECK: Section (2) .rela.text {
51 // CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSGD16_HA a
52 // CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSGD16_LO a
53 // CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TLSGD a
54 // CHECK: 0x{{[0-9,A-F]+}} R_PPC64_REL24 __tls_get_addr