xref: /aosp_15_r20/external/llvm/test/MC/PowerPC/ppc64-tls-relocs-01.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc -triple=powerpc64-unknown-linux-gnu -filetype=obj %s | \
2*9880d681SAndroid Build Coastguard Worker# RUN: llvm-readobj -r | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker        .text
5*9880d681SAndroid Build Coastguard Worker        addis 3, 13, t@tprel@ha
6*9880d681SAndroid Build Coastguard Worker        addi 3, 3, t@tprel@l
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker        .type t,@object
9*9880d681SAndroid Build Coastguard Worker        .section .tbss,"awT",@nobits
10*9880d681SAndroid Build Coastguard Worker        .globl t
11*9880d681SAndroid Build Coastguard Worker        .align 2
12*9880d681SAndroid Build Coastguard Workert:
13*9880d681SAndroid Build Coastguard Worker        .long 0
14*9880d681SAndroid Build Coastguard Worker        .size t, 4
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker# Check for a pair of R_PPC64_TPREL16_HA / R_PPC64_TPREL16_LO relocs
17*9880d681SAndroid Build Coastguard Worker# against the thread-local symbol 't'.
18*9880d681SAndroid Build Coastguard Worker# CHECK:      Relocations [
19*9880d681SAndroid Build Coastguard Worker# CHECK:        Section ({{[0-9]+}}) .rela.text {
20*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT:     0x{{[0-9,A-F]+}} R_PPC64_TPREL16_HA t
21*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT:     0x{{[0-9,A-F]+}} R_PPC64_TPREL16_LO t
22*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT:   }
23