]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/arm-tls-norelax-gd-ie.s
Vendor import of lld trunk r290819:
[FreeBSD/FreeBSD.git] / test / ELF / arm-tls-norelax-gd-ie.s
1 // RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %p/Inputs/arm-tls-get-addr.s -o %t1
2 // RUN: ld.lld %t1 --shared -o %t1.so
3 // RUN: llvm-mc %s -o %t.o -filetype=obj -triple=armv7a-linux-gnueabi
4 // RUN: ld.lld %t1.so %t.o -o %t
5 // RUN: llvm-readobj -s -dyn-relocations %t | FileCheck %s
6 // REQUIRES: arm
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
19 func:
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:   0x12078 R_ARM_TLS_DTPMOD32 y
29 // CHECK-NEXT:   0x1207C R_ARM_TLS_DTPOFF32 y
30 // CHECK-NEXT:   0x1300C R_ARM_JUMP_SLOT __tls_get_addr