28 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3 4## When a TLS section is discarded, we will resolve the relocation in a non-SHF_ALLOC5## section to the addend. Technically, we can emit an error in this case as the6## relocation type is not TLS.7# RUN: ld.lld %t.o --gc-sections -o %t8# RUN: llvm-readelf -x .noalloc %t | FileCheck %s9 10# RUN: echo '.section .tbss,"awT"; .globl root; root: .long 0' | \11# RUN: llvm-mc -filetype=obj -triple=x86_64 - -o %t1.o12# RUN: ld.lld --gc-sections -u root %t.o %t1.o -o %t13# RUN: llvm-readelf -x .noalloc %t | FileCheck %s14 15# CHECK: Hex dump of section '.noalloc':16# CHECK-NEXT: 0x00000000 00800000 0000000017 18.globl _start19_start:20 21.section .tbss,"awT",@nobits22 .long 023tls:24 .long 025 26.section .noalloc,""27 .quad tls+0x800028