1// REQUIRES: arm 2// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %p/Inputs/arm-tls-get-addr.s -o %t1.o 3// RUN: ld.lld %t1.o --shared -soname=t1.so -o %t1.so 4// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=armv7a-linux-gnueabi 5// RUN: ld.lld %t1.so %t.o -o %t 6// RUN: llvm-readobj -S --dyn-relocations %t | FileCheck %s 7 8/// This tls global-dynamic sequence is with respect to a preemptible symbol but 9/// is in an application so a relaxation to Initial Exec would normally be 10/// possible. This would result in an assertion failure on ARM as the 11/// relaxation functions can't be implemented on ARM. Check that the sequence 12/// is handled as global dynamic 13 14 .text 15 .syntax unified 16 .globl func 17 .p2align 2 18 .type func,%function 19func: 20.L0: 21 .globl __tls_get_addr 22 bl __tls_get_addr 23 bx lr 24 .p2align 2 25 .Lt0: .word y(TLSGD) + (. - .L0 - 8) 26 27// CHECK: Dynamic Relocations { 28// CHECK-NEXT: 0x30290 R_ARM_TLS_DTPMOD32 y 29// CHECK-NEXT: 0x30294 R_ARM_TLS_DTPOFF32 y 30// CHECK-NEXT: 0x402A4 R_ARM_JUMP_SLOT __tls_get_addr 31