33 lines · plain
1# REQUIRES: x862## Test we resolve relocations referencing TLS symbols in .debug_* sections to3## a tombstone value if the referenced TLS symbol is discarded.4 5# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o6# RUN: ld.lld --gc-sections %t.o -o %t7# RUN: llvm-objdump -s %t | FileCheck %s8 9# CHECK: Contents of section .debug_info:10# CHECK-NEXT: 0000 00000000 00000000 00000000 0000000011# CHECK-NEXT: 0010 00000000 ffffffff12 13.globl _start14_start:15 ret16 17.section .tbss,"awT",@nobits18.globl global19local:20global:21 .quad 022 23.section .debug_info24## On ppc64, .quad local@dtprel+0x8000 (st_value 0 is supposed to point to25## 0x8000 bytes past the start of ## the dynamic TLS vector. References usually26## have an addend of 0x8000). MIPS is similar. RISC-V uses 0x800.27 .quad local@dtpoff+0x800028 .quad global@dtpoff+0x800029 30## Many other architectures don't use an offset. GCC x86-64 uses a 32-bit value.31 .long global@dtpoff32 .long -133